标签:
再仔细看了下4.0中的方法:
java.util.ArrayList<android.view.View> |
getCurrentViews() Returns an ArrayList of the Views currently displayed in the focused Activity or Dialog. |
|
|
getCurrentViews(java.lang.Class<T> classToFilterBy) Returns an ArrayList of Views matching the specified class located in the focused Activity or Dialog. |
|
|
getCurrentViews(java.lang.Class<T> classToFilterBy, android.view.View parent) Returns an ArrayList of Views matching the specified class located under the specified parent. |
虽然只剩下了三个getCurrentViews()方法,但却可以替代3.6的众多方法
java.lang.Class<T> classToFilterBy参数传入相应的类即可
例如:ArrayList<ImageView> imageList=solo.getCurrentViews(ImageView.class);得到的即是ImageView
ArrayList<ImageView> imageList=solo.getCurrentViews(ImageView.class,parentView);
老李分享:robotium3.6与4.0 later 的区别 2
标签:
原文地址:http://www.cnblogs.com/poptest/p/5121920.html