0
我有一些文本视图和编辑文本的线性布局,出于某种原因,当我在模拟器输入到编辑文本运行正常,但不是在设备上。当我输入编辑文本时,文本不会出现在编辑文本框中。这里的布局:编辑文字不允许键盘输入设备上?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:text="Complete Order Form"
android:textSize="20dp"
android:textStyle="bold"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.25"
android:gravity="center"/>
<TextView
android:text="Enter Name: "
android:textSize="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight=".25"/>
<EditText
android:id="@+id/nameEdit"
android:hint="Name"
android:layout_width="match_parent"
android:layout_weight=".25"
android:layout_height="wrap_content" />
<TextView
android:text="Enter Address:"
android:textSize ="20dp"
android:layout_width="match_parent"
android:layout_weight=".25"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/addressEdit"
android:hint="Address"
android:layout_weight=".25"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<TextView
android:text="Enter Phone: "
android:textSize="20dp"
android:layout_width="match_parent"
android:layout_weight=".25"
android:layout_height="wrap_content" />
<EditText
android:id="@+id/phoneNoEdit"
android:hint="Phone"
android:layout_width="match_parent"
android:layout_weight=".25"
android:layout_height="wrap_content" />
<TextView
android:text="Enter Order Comments: "
android:textSize="20dp"
android:layout_width="match_parent"
android:layout_weight=".25"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/comments"
android:hint="Comments"
android:layout_width="match_parent"
android:layout_weight=".25"
android:layout_height="wrap_content" />
<Button
android:id="@+id/sendOrder"
android:text="Continue to Payment"
android:layout_width="match_parent"
android:layout_weight=".25"
android:layout_height="wrap_content" />
<Button
android:id="@+id/dontSend"
android:layout_width="match_parent"
android:layout_weight=".25"
android:layout_height="wrap_content"
android:text="Cancel" />
</LinearLayout>
的排序。当我在仿真器上运行它时,它工作正常,所以我知道仿真器不是问题。当我在实际设备上运行活动时,文本不会显示在框中。我试过改变设备上的输入法 – ACanicatti
文本没有出现在EditText框中?我的意思是文本字段中的文本带有一个字符串,如“密码”。这是不是出现? – user1546859
我得到它的工作,我已经错误地切换了文本视图的编号和编辑文本。无论如何感谢 – ACanicatti