安卓 - 右侧滑动菜单导航是否可行?

68

请查看此答案:https://dev59.com/1XTYa4cB1Zd3GeqPycAt#17792254 对我有效。 - Rudi
11个回答

0
正确答案是:android:layoutDirection="rtl"
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/my_drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layoutDirection="rtl"
tools:openDrawer="start"
tools:context=".MainActivity">

这也适用于工具栏,它是从右向左打开的。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接