< RelativeLayout xmlns:android ="http://schemas.android.com/apk/res/android"
xmlns:tools= "http://schemas.android.com/tools"
android:layout_width= "match_parent"
android:layout_height= "match_parent"
android:background= "@drawable/baidi" >
< ImageView
android:id ="@+id/login_button"
android:layout_width ="wrap_content"
android:layout_height ="wrap_content"
android:layout_centerHorizontal ="true"
android:layout_marginTop ="50dp"
android:src ="@drawable/yezizhi" />
<!--整體邊框塊的顏色 -->
<LinearLayout
android:id ="@+id/input"
android:layout_width ="fill_parent"
android:layout_height ="wrap_content"
android:layout_below ="@id/login_button"
android:layout_marginLeft ="28.0dip"
android:layout_marginRight ="28.0dip"
android:background ="@drawable/baidi"
android:orientation ="vertical" >
<!--賬號框顏色-->
< LinearLayout
android:layout_width ="fill_parent"
android:layout_height ="44.0dip"
android:background ="@drawable/baidi"
android:gravity ="center_vertical"
android:orientation ="horizontal" >
< EditText
android:id ="@+id/searchEditText"
android:layout_width ="0dp"
android:layout_height ="fill_parent"
android:layout_weight ="1"
android:background ="@null"
android:ems ="10"
android:imeOptions ="actionDone"
android:singleLine ="true"
android:textSize ="16sp"
android:hint="輸入賬戶名"
android:text="輸入賬戶名">
< requestFocus />
</ EditText>
</ LinearLayout>
< View
android:layout_width ="fill_parent"
android:layout_height ="1.0px"
android:layout_marginLeft ="1.0px"
android:layout_marginRight ="1.0px"
android:background ="#ffc0c3c4" />
<!--隱形顯示文字,點擊消失-->
< EditText
android:id ="@+id/password"
android:layout_width ="fill_parent"
android:layout_height ="44.0dip"
android:background ="#00ffffff"
android:gravity ="center_vertical"
android:inputType ="textPassword"
android:maxLength ="16"
android:maxLines ="1"
android:textColor ="#ff1d1d1d"
android:textColorHint ="#ff666666"
android:textSize ="16.0sp"
android:hint="密碼"
android:text="輸入密碼" />
</LinearLayout >
<Button
android:id ="@+id/buton1"
android:layout_width ="270dp"
android:background ="@drawable/landi"
android:paddingTop ="5.0dip"
android:layout_height ="50dp"
android:gravity ="center"
android:textSize ="20dp"
android:text = "登錄"
android:layout_alignBottom="@id/input"
android:layout_centerHorizontal="true" />
</ RelativeLayout>
報錯XML:not well-formed
錯誤地方在 android:layout_alignBottom="@id/input"
和 android:layout_below ="@id/login_button"
你很多xml元素開始都有一個空格,這是不規范的,應該去掉