DrawerLayout怎样禁止滑动

190 阅读1分钟

目录

DrawerLayout怎样禁止滑动


DrawerLayout怎样禁止滑动

android:fitsSystemWindows="true"

在 布局文件中,正常的布局样式:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <android.support.v4.widget.DrawerLayout
        tools:openDrawer="start"
        android:fitsSystemWindows="true"
        android:layout_width="match_parent