Enumerate/Iterate all Views in Activity?

后端 未结 8 584
忘了有多久
忘了有多久 2020-12-09 17:33

Is there a way to iterate through all the views in your Activity? Something like:

Iterator it = getViewIterator();
...

Does this exi

8条回答
  •  悲&欢浪女
    2020-12-09 17:56

    If you actually need an iterator, there isn't anything like that available in the api. You'll have to write your own that is built on top of the logic that Harry Joy and Javanator suggest.

提交回复
热议问题