Android-ChromeOS-BottomSheetDialogFragment无法在全屏的ChromeOS上运行

时间:2018-09-26 20:33:53

标签: android bottom-sheet androidappsonchromeos

我正在扩展BottomSheetDialogFragment以便在应用程序上显示底部菜单。这是用于视图的布局。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:app="http://schemas.android.com/apk/res-auto"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical">

    <android.support.v7.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clickable="true"
        android:focusable="true"
        android:foreground="?android:attr/selectableItemBackground"
        app:cardCornerRadius="1dp"
        app:cardElevation="2dp"
        app:contentPaddingBottom="16dp"
        app:contentPaddingTop="16dp">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginStart="32dp"
            android:text="menu 1"/>
    </android.support.v7.widget.CardView>

    <android.support.v7.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="1px"
        android:clickable="true"
        android:focusable="true"
        android:foreground="?android:attr/selectableItemBackground"
        app:cardCornerRadius="1dp"
        app:cardElevation="2dp"
        app:contentPaddingBottom="16dp"
        app:contentPaddingTop="16dp">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_marginStart="32dp"
            android:text="menu 2"/>
    </android.support.v7.widget.CardView>

</LinearLayout>

我的问题是,当应用程序在Chrome操作系统上全屏运行时,BottomSheetDialogFragment无法正确绘制。

App on full screen

当应用程序在窗口模式下运行时,BottomSheetDialogFragment会正确绘制。

App on Window Mode

当我在另一个应用程序上全屏切换应用程序时,该应用程序正确显示

App on full screen - after toggle the application with keep

Google Chrome操作系统版本-69.0.3497.95(稳定版)

0 个答案:

没有答案
相关问题