public static Matcher<View> withTableLayout(final int tableLayoutId, final int row, final int column) {
return new CustomTypeSafeMatcher<View>(format("Table layout with id: {0} at row: {1} and column: {2}",
tableLayoutId, row, column)) {
@Override
protected boolean matchesSafely(View item) {
View view = item.getRootView().findViewById(tableLayoutId);
if (view == null || !(view instanceof TableLayout))
return false;
TableLayout tableLayout = (TableLayout) view;
TableRow tableRow = (TableRow) tableLayout.getChildAt(row);
View childView = tableRow.getChildAt(column);
return childView == item;
}
};
}
EspressoViewMatchers.java 文件源码
java
阅读 35
收藏 0
点赞 0
评论 0
项目:AndroidSnooper
作者:
评论列表
文章目录