有没有一种方法来遍历在活动各方面的意见?是这样的:
Is there a way to iterate through all the views in your Activity? Something like:
Iterator it = getViewIterator();
...
这是否存在呢?我找不到它的任何气味的任何地方...
Does this exist at all? I couldn't find any scent of it anywhere...
谢谢! 猪
如果你有你的的LinearLayout
或其他容器中的所有浏览
扩展的ViewGroup
则可以使用功能 getChildCount()
和 getChildAt(INT)
和遍历所有的的
包含了意见。
If you have all your Views in a LinearLayout
or an other container
that extends ViewGroup
you can use the functions getChildCount()
and getChildAt(int)
and iterate through all of the
contained views.
希望这有助于。