android – 同一个Activity上的两个导航抽屉

android – 同一个Activity上的两个导航抽屉,第1张

概述是否可以在同一活动中配置两个导航抽屉,一个来自左边,另一个来自右边? 您可以使用抽屉布局 <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_ 是否可以在同一活动中配置两个导航抽屉,一个来自左边,另一个来自右边?解决方法 您可以使用抽屉布局
<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 -->   <FrameLayout      androID:ID="@+ID/content_frame"    androID:layout_wIDth="match_parent"    androID:layout_height="match_parent" /><!-- The navigation drawer -->    <ListVIEw androID:ID="@+ID/left_drawer"       androID:layout_wIDth="240dp"       androID:layout_height="match_parent"       androID:layout_gravity="start"       androID:choiceMode="singleChoice"       androID:divIDer="@androID:color/transparent"       androID:divIDerHeight="0dp"       androID:background="#111"/>   <ListVIEw androID:ID="@+ID/right_drawer"       androID:layout_wIDth="240dp"       androID:layout_height="match_parent"       androID:layout_gravity="end"       androID:choiceMode="singleChoice"       androID:divIDer="@androID:color/transparent"       androID:divIDerHeight="0dp"       androID:background="#111"/> </androID.support.v4.Widget.DrawerLayout>

还要检查文档https://developer.android.com/training/implementing-navigation/nav-drawer.html

确保使用工具栏而非 *** 作栏

总结

以上是内存溢出为你收集整理的android – 同一个Activity上的两个导航抽屉全部内容,希望文章能够帮你解决android – 同一个Activity上的两个导航抽屉所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1137013.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-30
下一篇2022-05-30

发表评论

登录后才能评论

评论列表(0条)

    保存