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, (http://developer.android.com/reference/android/R.styleable.html)
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. (http://stackoverflow.com/questions/1717489/android-hello-gallery-tutorial-r-styleable-cannot-be-resolved)
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!
Latest posts by Chris Wade (see all)
- Understanding PDF forms – FDF structure - July 20, 2011
- Understanding PDF Forms – introduction to XFA Forms - June 22, 2011
- Understanding PDF forms – introduction to FDF forms - May 25, 2011
- Understanding PDF forms – introduction what are PDF forms - April 20, 2011
- Writing cleaner Java code with eclipse - March 16, 2011