6

`BottomSheetDialogが表示されているときにffを行う方法はありますか?

  1. ステータスバーを非表示にするか、BottomSheetDialogフルスクリーンにしますか?
  2. の高さを制限BottomSheetDialogして、ActionBar

アクティビティ

<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    >
  <RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent">

     <include android:id="@+id/toolbar"
          layout="@layout/layout_toolbar"/>
     <!-- other UI stuff -->
</RelativeLayout>
  <ViewStub
      android:id="@+id/view_stub"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_gravity="bottom" />
</android.support.design.widget.CoordinatorLayout>

BottomSheetDialog Layoutこれは ViewStub にロードされます

<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"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    app:behavior_peekHeight="100dp"
    android:background="@android:color/transparent">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/share_via"
        android:layout_margin="@dimen/my_padding"/>

    <GridView
        android:id="@+id/grid"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:drawSelectorOnTop="true"
        android:listSelector="@drawable/grid_selector"
        android:stretchMode="columnWidth"
        tools:listitem="@layout/grid_item_layout" />

</LinearLayout>

展開された BottomSheetDialog 展開された BottomSheetDialog

ピークの高さ ピークの高さ

隠しボトムシートダイアログ 隠しボトムシートダイアログ

4

0 に答える 0