Reputation: 145
How can I put labels in a grid view?
Example: http://developer.android.com/design/building-blocks/grid-lists.html#with-labels
Upvotes: 1
Views: 1639
Reputation: 116322
for the getView() method of the adapter , return a framelayout with an imageView , and a textview on the bottom (on top of the imageView) , similar to what's written on the first chunk of code here . you can use the inflater in order to use XML file for all of the thumbnails , if you wish, so that you can preview it on the visual editor.
also, for more information of views like the gridView ,watch this:
http://www.youtube.com/watch?v=wDBM6wVEO70
i know it's about listView , but the ideas are the same.
Upvotes: 1