有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java抽屉布局采用全屏幕宽度,无法滑动

我正在使用安卓x和新的"com.google.安卓.material:material:1.0.0",但是DrawerLayout工作不正常。它需要全屏宽,我甚至不能滑动它。检查附件enter image description here

下面是我的简单布局:

<安卓x.drawerlayout.widget.DrawerLayout xmlns:安卓="http://schemas.安卓.com/apk/res/安卓"
    xmlns:app="http://schemas.安卓.com/apk/res-auto"
    xmlns:tools="http://schemas.安卓.com/tools"
    安卓:id="@+id/drawerLayout"
    安卓:layout_width="match_parent"
    安卓:layout_height="match_parent"
    tools:context=".activities.DrawerActtivity"

    >
    <FrameLayout
        安卓:layout_width="match_parent"
        安卓:layout_height="match_parent"/>
    <com.google.安卓.material.navigation.NavigationView
        安卓:id="@+id/navigationView"
        安卓:layout_width="wrap_content"
        安卓:layout_height="match_parent"
        app:itemTextColor="@color/navigation_item_selection"
        app:itemIconTint="@color/navigation_item_selection"
        app:menu="@menu/drawer_menu"

        />

</安卓x.drawerlayout.widget.DrawerLayout>

我用support库检查我的另一个项目及其相同的项目。我认为问题在于这些新材料库


共 (0) 个答案