【发布时间】:2014-08-26 20:01:43
【问题描述】:
我的应用程序需要左右抽屉。
我的布局如下:
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<fragment
android:id="@+id/detail_fragment"
android:name="my detail fragment class name"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<fragment
android:id="@+id/left_drawer"
android:name="My LeftDrawerFragment class name"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="left" />
<fragment
android:id="@+id/right_drawer"
android:name="My RightDrawerFragment class name"
android:layout_width="@dimen/navigation_drawer_width"
android:layout_height="match_parent"
android:layout_gravity="right" />
</android.support.v4.widget.DrawerLayout>
所以通过我的左抽屉和右抽屉片段,我正在加载抽屉。 内容正在加载,但我无法定位正确的抽屉图标。只有一个抽屉图标出现了,左边也是。如何实现左右抽屉?谁能解决我的问题?
【问题讨论】:
标签: android android-fragments navigation-drawer