在用布局嵌套时出现了前缀错误,请教该如何修改?
<TableRow >
<LinearLayout >
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/f"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
androdi:text="@string/nan"/>
<RadioButton
android:id="@+id/m"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nv"/>
</RadioGroup>
</LinearLayout>
</TableRow>
[最优解释]
android拼写错误,标签结束位置错误
[其他解释]
你LinearLayout 的属性没写
[其他解释]
爆什么错也不说啊
[其他解释]
[其他解释]
你这是完整的XML文件?
[其他解释]
<?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="horizontal" >
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="1">
<TableRow >
<RelativeLayout >
<TextView
android:id="@+id/tv"
android:layout_width="50dp"
android:layout_height="30dp"
android:text="用户名:"
/>
<EditText
android:id="@+id/et"
android:layout_toRightOf="@id/tv"
android:layout_width="150dp"
android:layout_height="wrap_content"
/>
</RelativeLayout>
</TableRow>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#cccccc"/>
<TableRow >
<RelativeLayout >
<TextView
android:id="@+id/tv1"
android:layout_width="50dp"
android:layout_height="30dp"
android:text="密码:"
/>
<EditText
android:inputType="textPassword"
android:id="@+id/et1"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/tv1"
/>
</RelativeLayout>
</TableRow>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#cccccc"/>
<TableRow >
<LinearLayou>
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<RadioButton
android:id="@+id/f"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
androdi:text="@string/nan"/>
<RadioButton
android:id="@+id/m"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nv"/>
</RadioGroup>
</LinearLayout>
</TableRow>
<TableRow>
<Button
android:id="@+id/btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="注册"
android:layout_gravity="center"/>
</TableRow>
</TableLayout>
</LinearLayout>
这是整个的XLM文件
[其他解释]
<?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="horizontal">
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="1">
<TableRow>
<RelativeLayout>
<TextView
android:id="@+id/tv"
android:layout_width="50dp"
android:layout_height="30dp"
android:text="用户名:" />
<EditText
android:id="@+id/et"
android:layout_toRightOf="@id/tv"
android:layout_width="150dp"
android:layout_height="wrap_content" />
</RelativeLayout>
</TableRow>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#cccccc" />
<TableRow>
<RelativeLayout>
<TextView
android:id="@+id/tv1"
android:layout_width="50dp"
android:layout_height="30dp"
android:text="密码:" />
<EditText
android:inputType="textPassword"
android:id="@+id/et1"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/tv1" />
</RelativeLayout>
</TableRow>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="#cccccc" />
<TableRow>
<LinearLayou>
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/f"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nan" />
<RadioButton
android:id="@+id/m"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nv" />
</RadioGroup>
</LinearLayou>
</TableRow>
<TableRow>
<Button
android:id="@+id/btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="注册"
android:layout_gravity="center" />
</TableRow>
</TableLayout>
</LinearLayout>
[其他解释]
呵呵 。。。自己真是粗心,受教了谢谢!!!