开发者

access cell inside a gridview in android

开发者 https://www.devze.com 2023-03-03 15:14 出处:网络
i have kept tags for each of the cell inside a GridView. once the gridview is drawn by a custom adapter that i have made, i wish to access one specifi开发者_开发技巧c cell inside the gridview.

i have kept tags for each of the cell inside a GridView. once the gridview is drawn by a custom adapter that i have made, i wish to access one specifi开发者_开发技巧c cell inside the gridview.

i have tried the following:

view = mygridView.findViewWithTag(tag);

but the view returned is null. how do i access the cell inside the gridview?

thank you in advance.


Try to use gridView.getChildAt(i).findViewWithTag(tag);

Hope it will help.. ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消