screenshot of drawer 我在我的app中有一個android導航抽屜工作正常,但是當我的抽屜可見時,它在項目之間有兩個分隔線。 一個紅色的(我想我已經做的),在白色的其他(我不知道它是從哪裏來的)導航抽屜中的兩個分隔線
這裏有我的兩個抽屜文件
custom_drawer_item.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="match_parent"
android:orientation="horizontal" >
<LinearLayout
android:id="@+id/itemlayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:orientation="vertical"
android:layout_marginTop="0dp"
android:background="?android:attr/activatedBackgroundIndicator"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="60dp"
>
<ImageView
android:id="@+id/drawer_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="6dp"
android:paddingTop="10dp"
/>
<TextView
android:id="@+id/drawer_itemName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSelectHandleLeft="@+id/drawer_icon"
android:textColor="#ffffff"
android:paddingTop="10dp"
/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginBottom="1dp"
android:layout_marginTop="1dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:background="#DADADC"
></View>
</LinearLayout>
</LinearLayout>
activity_main.xml中
<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">
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</FrameLayout>
<ListView
android:id="@+id/leftdrawer"
android:layout_width="200dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:choiceMode="singleChoice"
android:divider="#B80000"
android:dividerHeight="1dp"
android:background="#076672"
/>
</android.support.v4.widget.DrawerLayout>
如果你仍然不能得到它請讓我爲image.il顯示 日Thnx提前
你能附加圖像嗎? – Charlesjean
https://www.dropbox.com/s/e0vnljid1j7cxjg/Screenshot_2014-07-27-17-10-12.png –