2013-07-01 38 views
2

我想實現抽屜式導航,但在我的xml文件 我得到這個錯誤:錯誤:錯誤:字符串類型不允許(在「layout_gravity」,值爲「開始」)

錯誤:錯誤:字符串類型不允許(在'layout_gravity'值 '開始')。

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/drawer_layout" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" > 

    <!-- The main content view --> 


<RelativeLayout 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical" 
    tools:context=".NeueNotizActivity" > 

    <EditText 
     android:id="@+id/editDocuTitleNewDocu" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginTop="15dp" 
     android:ems="10" 
     android:inputType="text" 
     android:hint="@string/Docu.title" > 

     <requestFocus /> 
    </EditText> 

     <View 
      android:id="@+id/ViewColorPickerHelper" 
      android:layout_width="1dip" 
      android:layout_height="wrap_content" 
      android:layout_alignParentBottom="true" 
      android:layout_alignParentTop="true" 
      android:layout_centerHorizontal="true" 
      android:layout_marginBottom="4dip" 
      android:layout_marginTop="410dip" 
      android:background="?android:attr/dividerVertical" /> 



<Button 
    android:id="@+id/btSaveNewDocu" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:layout_toRightOf="@+id/btAbortNewDocu" 
    android:background="?android:attr/selectableItemBackground" 
    android:onClick="speichern" 
    android:text="@string/Docu.save" 
    android:drawableLeft="@android:drawable/ic_input_add" /> 



</RelativeLayout> 

<!-- The navigation drawer --> 

    <ListView 
     android:id="@+id/drawer" 
     android:layout_width="240dp" 
     android:layout_height="match_parent" 
     android:layout_gravity="start" 
     android:background="#F3F3F4" 
     android:choiceMode="singleChoice" 
     android:divider="@android:color/transparent" 
     android:dividerHeight="0dp" /> 

</android.support.v4.widget.DrawerLayout> 

我希望你能幫忙。 當我刪除這個:android:layout_gravity =「開始」,那麼菜單不起作用。

回答

2

無論什麼樣的minSdkVersion你靶向(在你AndroidManifest),與Android 4

相關問題