【发布时间】:2014-07-27 20:05:18
【问题描述】:
screenshot of drawer 我的应用程序中有一个 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 节目 提前谢谢
【问题讨论】:
-
可以附上图片吗?