Creating Gridview having clickable images,Android

Harshit Syal picture Harshit Syal · Aug 14, 2012 · Viewed 43.5k times · Source

I want to create a gridview having clickable images..

When ever an image is clicked a corresponding value will be shown below that grid view.

Design of that grid view should be something like this

The problem I am facing is in designing part, I dont know how to design a grid view like this.. every time I try to do that I get some bad results.. I have no android ui designing experience as of now.

Please Help !

Answer

Avi Kumar Manku picture Avi Kumar Manku · Aug 14, 2012

GridView is a ViewGroup that displays items in a two-dimensional, scrollable grid. The grid items are automatically inserted to the layout using a ListAdapter.

For an introduction to how you can dynamically insert views using an adapter, read Building Layouts with an Adapter.

http://developer.android.com/guide/topics/ui/declaring-layout.html#AdapterViews

and These are good GridView tutorials will help you

http://www.androidhive.info/2012/02/android-gridview-layout-tutorial/

http://www.mkyong.com/android/android-gridview-example/

and

http://developer.android.com/guide/topics/ui/layout/gridview.html