【发布时间】:2017-03-26 14:25:20
【问题描述】:
5.5 英寸屏幕设备下方导航抽屉中菜单项的注销布局重叠
这在 5.5 英寸屏幕设备上看起来很完美
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.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/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@drawable/drawer_bg"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:itemTextColor="@color/grey_text"
app:menu="@menu/activity_main_drawer">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="#50000000"
android:clickable="true"
android:orientation="vertical">
<TextView
android:id="@+id/nav_logout"
android:layout_width="match_parent"
android:layout_height="44dp"
android:gravity="center"
android:text="Logout"
android:textColor="@color/colorAccent"
android:textSize="16sp" />
</LinearLayout>
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
这是我的 xml 代码。我的问题是如何让注销布局成为 5.5 英寸以下屏幕中导航抽屉的一部分,以便用户可以滚动菜单以到达底部以获取注销按钮。
谢谢。
【问题讨论】:
标签: android xml user-interface