Here I present are few tips for writing HelloGridView tutorial on Google Android website – http://developer.android.com/resources/tutorials/views/hello-gridview.html
- Create ImageAdapter class must be in a new file of same name under same package ( in Java, a public class must be in a file of same name as the class).
- Press Ctrl + shift + O to make Eclipse import all required files into the file after writing all code in that file.
- When using resources, it’s advisable to put low-res images in res/drawable-ldpi folder, medium-res images in res/drawable-mdpi, and high-res images in res/drawable-hdpi folder. For this tutorial, I put identical images in all 3 folders.