2015-04-07 67 views
0

我正在創建一個android應用程序,它由登錄頁面組成,我創建了帶有兩個按鈕的登錄頁面,但是顯示錯誤的xml名爲錯誤:解析XML時出錯:未綁定前綴請告訴我如何解決它。?如何修復x解析XML時出錯:在android中的未綁定前綴

這是我的XML

<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" 
    tools:context="com.developer.milanandroid.Login" > 

    <LinearLayout 
     android:id="@+id/linearLayout1" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignLeft="@+id/linear_1" 
     android:layout_alignRight="@+id/linear_1" 
     android:layout_below="@+id/linear_1" 
     android:layout_marginTop="56dp" > 

     <TextView 
      android:id="@+id/password" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="PASSWORD :" 
      android:textAppearance="?android:attr/textAppearanceMedium" /> 

     <EditText 
      android:id="@+id/editTextusername" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:ems="10" 
      android:inputType="textPassword" /> 
    </LinearLayout> 

    <LinearLayout 
     android:id="@+id/linear_1" 
     android:layout_width="450dp" 
     android:layout_height="wrap_content" 
     android:layout_alignParentTop="true" 
     android:layout_centerHorizontal="true" 
     android:layout_marginTop="108dp" 
     android:orientation="horizontal" > 

     <TextView 
      android:id="@+id/username" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="USER NAME: " 
      android:textAppearance="?android:attr/textAppearanceMedium" /> 

     <EditText 
      android:id="@+id/editTextpassword" 
      android:layout_width="350dp" 
      android:layout_height="wrap_content" /> 
    </LinearLayout> 

    <LinearLayout 
     android:layout_width="450dp" 
     android:layout_height="wrap_content" 
     android:layout_alignLeft="@+id/linearLayout1" 
     android:layout_below="@+id/linearLayout1" 
     android:layout_marginTop="63dp" > 

     <Button 
      android:id="@+id/clear" 
      style="?android:attr/buttonStyleSmall" 
      android:layout_width="225dp" 
      android:layout_height="wrap_content" 
      android:text="clear" /> 

    <!--  <Button 
      android:id="@+id/Login" 
      style="?android:attr/buttonStyleSmall" 
      android:layout_width="225dp" 
      android:layout_height="wrap_content" 
      android:text="login" />--> 
     <com.developer.milanandroid.buttonlib.ActionProcessButton 
      android:id="@+id/btnSignIn" 
      android:layout_width="match_parent" 
      android:layout_height="48dp" 
      android:layout_marginBottom="16dp" 
      android:text="Sign_in" 
      android:textColor="@android:color/white" 
      android:textSize="18sp" 
      custom:pb_colorComplete="@color/green_complete" 
      custom:pb_colorNormal="@color/blue_normal" 
      custom:pb_colorPressed="@color/blue_pressed" 
      custom:pb_colorProgress="@color/purple_progress" 
      custom:pb_textComplete="Success" 
      custom:pb_textProgress="Loading" /> 

    </LinearLayout> 

</RelativeLayout> 

回答

4

添加

xmlns:custom="http://schemas.android.com/apk/res-auto" 

到您的佈局。

<com.developer.milanandroid.buttonlib.ActionProcessButton 
     xmlns:custom="http://schemas.android.com/apk/res-auto" 
     android:id="@+id/btnSignIn" 
+0

謝謝你的作品像魅力。感謝你的傢伙@Blackbelt –

+1

是..作品amzaing –

相關問題