问题如下图所示,没有显示按钮和输入框
下面是xml里面的代码
<TextView android:id="@+id/textview" android:layout_width="207dp" android:layout_height="wrap_content" android:text="hello word" android:textColor="#ff0000" android:textSize="30sp" /> <EditText android:id="@+id/etuser" android:hint="ple input your name" android:layout_width="match_parent" android:layout_height="wrap_content"></EditText> <Button android:id="@+id/btnlogin" android:text="login" android:layout_width="match_parent" android:layout_height="wrap_content"></Button>
原因TextView里面的高度设为match_parent则整体占整个xml应该改为wrap_content