我對android/java很新穎,並且一直在關注一些YouTube教程,並且在我的一個xml佈局中遇到了一個嚴重問題。Android類型錯誤:解析XML時出錯:格式不正確(無效標記)
基本上,我在EditText
部分中的代碼的android:hint
上發生'錯誤解析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="wrap_content"
android:orientation="vertical"
android:padding="25dp" >
<EditText
android:id="@+id/etCommands"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="@string/Type a command"
android:inputType="true">
</EditText>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="100" >
<Button
android:id="@+id/bResults"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="20"
android:text="@string/Try Command" >
</Button>
<ToggleButton
android:id="@+id/tbPassword"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="80"
android:checked="true"
android:paddingBottom="3dp"
android:text="@string/ToggleButton" />
</LinearLayout>
<TextView
android:id="@+id/tvResults"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/Invalid"
</TextView>
</LinearLayout>
關閉TextView的 – Dharmendra 2012-08-06 13:31:44