How to show TextView and ImageView both in a single Gallery View . I want to show Image title for each image just below it.
A:
Create a custom layout that uses a LinearLayout
or RelativeLayout
to position your TextView
and ImageView
. Then, use that layout with your SimpleCursorAdapter
that you hand to the Gallery
.
CommonsWare
2010-10-06 13:30:39
Can you post any example explaining that . I am using the images and text from resources folder
2010-10-07 04:34:46
@user467911: I have done little with `Gallery`, but all `AdapterView` subclasses (`Gallery`, `ListView`, `GridView`, etc.) work pretty much the same. Here is a sample project showing a `SimpleCursorAdapter` for a `ListView` with a custom row: http://github.com/commonsguy/cw-android/tree/master/Database/Constants/ And here is a free excerpt from one of my books that talks about how to override methods on the adapter to further tailor your look: http://commonsware.com/Android/excerpt.pdf
CommonsWare
2010-10-07 11:22:07