Ошибка при загрузке темы при загрузке графического макета - PullRequest
2 голосов
/ 08 февраля 2012

Когда я открываю XML-файл, то нет возможности открыть графический макет, чтобы проверить дизайн без запуска приложения

  <?xml version="1.0" encoding="utf-8"?>

<ScrollView  xmlns:android="http://schemas.android.com/apk/res/android"
             android:layout_height="match_parent" 
             android:layout_width="match_parent"
             android:fillViewport="true" 
             >

<LinearLayout

  android:orientation="vertical"
  android:layout_width="match_parent"
  android:background="#FFFFFF"
  android:layout_height="match_parent"

  >

    <ImageView android:layout_height="wrap_content" 
               android:layout_width="wrap_content" 
               android:id="@+id/login_imgview_Organisemee_Icon"
               android:layout_gravity="center_horizontal"
               android:layout_marginTop="20dip" 
               android:src="@drawable/logo">
               </ImageView>
    <TextView  android:id="@+id/login_txtview_title"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:layout_marginTop="30dip"
               android:layout_marginLeft="30dip"
               android:textAppearance="@style/black_18"
               android:text="@string/login_txt_title">
   </TextView>

    <TextView  android:id="@+id/login_txtview_error"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"                
               android:layout_marginTop="10dp"
               android:layout_marginLeft="30dp"
               android:layout_marginRight="30dp"
               android:textAppearance="@style/Red_18"              
               >
   </TextView>

    <TextView  android:id="@+id/login_txtview_username"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:text="@string/login_txt_username"
               android:textAppearance="@style/black_18"
               android:layout_marginLeft="28dip"
               android:layout_marginTop="20dip" >
   </TextView>
   <EditText
               android:id="@+id/login_editText_username"
               android:layout_width="fill_parent"
               android:layout_height="wrap_content"
               android:layout_marginLeft="25dip"
               android:text="android"
               android:layout_marginRight="25dip"
               android:layout_marginTop="5dp"
               android:singleLine="true"   />

   <TextView   android:id="@+id/login_txtview_password"
               android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:text="@string/login_txt_password"
               android:textAppearance="@style/black_18"
               android:layout_marginLeft="28dip"               
               android:layout_marginTop="15dip" >
   </TextView>
   <EditText
               android:id="@+id/login_editText_password"
               android:layout_width="fill_parent"
               android:layout_height="wrap_content"
               android:layout_marginLeft="25dip"
               android:layout_marginRight="25dip"
               android:layout_marginTop="5dp"
               android:text="android"              
               android:password="true"
               android:singleLine="true"

   />
   <TextView   android:layout_width="wrap_content"
               android:layout_height="wrap_content"
               android:layout_weight="1">
   </TextView>

   <RelativeLayout                  
               android:layout_width="fill_parent"
               android:layout_height="55dip"                               
               android:background="#6c6c6c"
               android:gravity="center">

  <ImageView   android:layout_width="wrap_content" 
               android:background="@drawable/ok" 
               android:id="@+id/login_imgview_ok"
               android:layout_centerInParent="true"     
               android:layout_toLeftOf="@+id/login_text_space"          
               android:layout_height="wrap_content">
               </ImageView>
  <TextView 
              android:id="@+id/login_text_space"                 
              android:layout_centerInParent="true"             
              android:layout_width="20dip" 
              android:layout_height="wrap_content">
              </TextView>

  <ImageView   android:layout_width="wrap_content" 
               android:background="@drawable/cancel" 
               android:id="@+id/login_imgview_cancel"
               android:layout_height="wrap_content" 
               android:layout_centerInParent="true"           
               android:layout_toRightOf="@+id/login_text_space">
               </ImageView>

               </RelativeLayout>

</LinearLayout>

</ScrollView>

Ответы [ 2 ]

2 голосов
/ 09 февраля 2012

изменить тему API из Andorid Layout Editor ...

0 голосов
/ 08 февраля 2012

Если у меня возникла проблема, то вы хотите увидеть графический макет вашего XML-файла, затем откройте ресурс / макет, затем

Щелкните правой кнопкой мыши файл LayoutXml

-> OpenWith-> Andorid Layout Editor

...