I have impelemented a BottomSheetDialog in my app but when I install it on a tablet and have the tablet laying down it does not expand fully on first click. It expands up to Collapsed state first and you have to drag it up to see everything. Why does it do this? Is it some setting you can change in your style?

```xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
    app:behavior_peekHeight="0dp"
    >
   ...

</LinearLayout>

```

```java
val view = layoutInflater.inflate(R.layout.home_bottom_sheet_dialog, null)
val bottomSheetDialog = BottomSheetDialog(activity!!)

bottomSheetDialog.setContentView(view)
bottomSheetDialog.show()

```

I use API 22 AndroidX with kotlin.

[![enter image description here](https://i.stack.imgur.com/ehsNT.png)](https://i.stack.imgur.com/ehsNT.png)
[![enter image description here](https://i.stack.imgur.com/6zWxR.png)](https://i.stack.imgur.com/6zWxR.png)