我正在使用带有appcomment lib和actionbar的drawerlayout但不能在我的按钮上执行滑动菜单
从此链接下载的抽屉布局示例程序 http://developer.android.com/training/implementing-navigation/nav-drawer.html
请如何在活动中添加我的按钮,滑动菜单将滑过这些按钮
答案 0 :(得分:1)
您可以添加包含drawerlayout的Parent Layout管理器和包含页脚的另一个布局管理器(底部需要按钮)
我试过一个样本:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="required width"
android:layout_height="required height" >
<FrameLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ListView
android:id="@+id/left_drawer"
android:layout_width="240dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#111"
android:choiceMode="singleChoice"
android:divider="@android:color/transparent"
android:dividerHeight="0dp" />
</android.support.v4.widget.DrawerLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="Footer height" >
</LinearLayout>
我希望这能解决你的问题...