android的view遍历以及多重查找
本资源提供对于ViewGroup下所以子view的遍历,以及调用Views都过tag或者Widget的类查找返回一个List 使用方法可见示例: 子View遍历 ViewGroup root = (ViewGroup) findViewById(android.R.id.content); LayoutTraverser.build(new LayoutTraverser.Processor() { @Override public void process(View view) { // do stuff with the view } }).traverse(root); 通过Views查找 // all views tagged "coolView" under "root" List coolViews = Views.find(root, "coolView"); // all ImageView views under "root" List image Views = Views.find(root, ImageView.class) Views = Views.find(root, ImageView.class)
文件列表
Travese.zip
(预估有个2文件)
Views.java
2KB
LayoutTraverser.java
870B
用户评论