It turns out that the refactor tool in Android Studio Refactor > Migrate to AndroidX
didn't correctly migrate the XML for the BottomSheetBehaviour.
The old location was android.support.design.widget.BottomSheetBehavior
, and was not modified by the migration tool. The original XML was:
<fragment
android:id="@+id/player_bottom_sheet_fragment"
android:name="app.rxsongbrowsertrials.ui.player.PlayerToggleFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:behavior_hideable="false"
app:behavior_peekHeight="56dp"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
/>
The new location is com.google.android.material.bottomsheet.BottomSheetBehavior
, so the layout needs to become:
<fragment
android:id="@+id/player_bottom_sheet_fragment"
android:name="app.rxsongbrowsertrials.ui.player.PlayerToggleFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:behavior_hideable="false"
app:behavior_peekHeight="56dp"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior"
/>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…