在Espresso中,可以检查视图是否显示:
onView(withText("To create a test configuration in Android Studio, complete the following steps")).check(matches(isDisplayed()));
但我需要检查的是我的TextView的文本(而不是TextView本身)是否显示完整。下面是我的XML布局:
<?xml version="1.0" encoding="utf-8"?>
<android.support.con
我有一个简单的活动与它的main.xml附加。main.xml有一个自定义布局(customLinearLayout)和一个简单的TextView。自定义布局也有自己的布局文件(linearlayout.xml)和一个简单的按钮。布局被类适当地放大了。
linearlayout.xml中的按钮将更改位于main.xml中的textView的文本,但我无法访问该textView。我做错了什么?我也不能给main.xml充气。
下面是customLinearLayout:
public class CustomLinearLayout extends LinearLayout {
LayoutI