How to place a textview on Gallery in android?

烈酒焚心 提交于 2019-12-25 05:26:11

问题


In my application i have gallery view , i am displaying images from database in gallery,i need to place a text view on gallery item and change the text view value based on gallery position.So,how i can place text view on gallery.please can any one help me.

Thanking in Advance.


回答1:


Use custom adapter for you gallery view. Every item will contain an ImageView and also a TextView, for example in a RelativeLayout.

Example here: Android gallery with caption



来源:https://stackoverflow.com/questions/17965420/how-to-place-a-textview-on-gallery-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!