I am utilizing a version of the "Grid View" example from the Android Developers site:
http://developer.android.com/resources/tutorials/views/hello-gridview.html
And I would like to display a small text caption below each of the images.
Can someone please give an example of how this might be accomplished (i.e. what needs to be edited)?
Thanks!
Instead of an ImageAdapter
returning ImageViews
from getView()
, you would need a TylerAdapter
returning a LinearLayout
or RelativeLayout
for each cell, with the layout containing your ImageView
and TextView
caption.
Here is a free excerpt from one of books that illustrates stuff like this, albeit in the context of a ListView
instead of a GridView
. Those are both AdapterViews
, and so the techniques are nearly identical.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With