Set Text on a GridView Image in Android

前端 未结 6 1954
盖世英雄少女心
盖世英雄少女心 2020-12-21 21:47

I have a grid view that have 8 images \"like

Now on a particular image view i want to set a text value

6条回答
  •  北荒
    北荒 (楼主)
    2020-12-21 22:16

    Use FrameLayout as child of GridView. Within FrameLayout first put ImageView & on top of it put a TextView as mentioned by "sush". Then you can change Visibility & content of TextView on demand, through program. It is not working for you because probably for all TextViews of you have put same "android:id" put different id for different TextView. It is bound to work. I've tested.

提交回复
热议问题