I have a linear lay开发者_如何转开发out and some widgets inside it. How to get position of some widget inside linear layout, so i can then use removeViewAt(int positon) function?
I think your confused about the removeViewAt
method. It is not passed a position of a view, it is passed an index parameter. This index is the index of the child within the ViewGroup
.
I don't think you can remove a view using position information. You would have to write some sort of method that decided which index to remove based on its positional information.
精彩评论