开发者

Find the Child of a table row

开发者 https://www.devze.com 2023-02-13 11:05 出处:网络
How can I find the child\'s attributes using the view of the parent. I have an onclick event in which the tapped row will be removed, now I want to find the Text of its child to delete(reset th vari开

How can I find the child's attributes using the view of the parent. I have an onclick event in which the tapped row will be removed, now I want to find the Text of its child to delete(reset th vari开发者_如何学Pythonable) the actual value.


Give an id to the child view you're looking for, then call row.findViewById().

Id's don't have to be unique in the layout tree, but they have to be in the part of tree you are searching in. This way you can give the same id to corresponding views in each row.

0

精彩评论

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