1.错误显示在打开TextView标记的行上,但它一直移动到不同的行,所以我不确定。 2.另外,对不起,如果其书面只是不好,这是我在编程解析XML时出错:不匹配的标记(无效标记)
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:ide="@+id/text_prompt"
android:text="Enter the total bill amount"
android:textSize="20sp" />
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView1"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:ems="10"
android:inputType="numberDecimal" />
</requestFocus>
<EditText/>
<Button
android:id="@+id/tip20"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="20 Percent"
android:layout_alignParentBottom="true" />
<Button
android:id="@+id/tip15"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="50dp"
android:text="15 Percent" />
<Button
android:id="@+id/tip10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="100dp"
android:text="10 Percent" />
<TextView
android:id="@+id/tip_prompt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:text="Select a tip amount:"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="150dp" />
</RelativeLayout>
现在它给我一个垃圾文件元素后出错 –
@MattBoggs,编辑我的答案;) – localhost
仍然是同样的事情。我正在跟着一个教程,所以我不知道什么是错的 –