Chris Wade Chris developed much of the Forms handling code and also the hooks for the XFA.

Solution for Android Tutorial Hello Gallery problem

37 sec read

I have spent many hours searching over the internet, looking for documentation that would tell me how to redo this tutorial so that it compiles in one of the android sources, i have 1.1, 1.5, 1.6, 2.0.

All seem to no longer have the android.R.styleable available in them, even though it is still in the API, (

Also the method obtainStyledAttributes is defined in API’s but it does not define what you should be sending in.

After some extensive searching i found a little site called stackoverflow, where someone was so kind to tell me that the 2 lines in question (shown below) can actually be omitted and the program will run. (

TypedArray a = obtainStyledAttributes(android.R.styleable.Theme);
mGalleryItemBackground = a.getResourceId(android.R.styleable.Theme_galleryItemBackground, 0);

The original tutorial is available here:

This post is part of our “Android Articles Index” series. In these articles, we aim to explore android in different ways. Have a look!

Do you need to solve any of these problems in Java?

Convert PDF to HTML5
Convert PDF to HTML5
Convert PDF to SVG
Convert PDF to SVG
Convert PDF Forms to HTML5 Forms
View Forms in the browser
Java PDF Reader and Viewer
View PDF Documents
Convert PDF to image
Convert PDF to image
Extract Text from PDF
Extract Text from PDF
Read/Write images in Java
Read/Write images
Replace ImageIO
Replace ImageIO
Convert Image to PDF
Convert Image to PDF
Chris Wade Chris developed much of the Forms handling code and also the hooks for the XFA.

Leave a Reply

Your email address will not be published. Required fields are marked *

IDRsolutions Ltd 2021. All rights reserved.