fix select playlist items bottom app bar

This commit is contained in:
deniscerri 2025-04-01 19:26:48 +02:00
parent c09d37d47c
commit f446ae9ebe
No known key found for this signature in database
GPG key ID: 95C43D517D830350
2 changed files with 4 additions and 8 deletions

View file

@ -83,10 +83,8 @@ class SelectPlaylistItemsDialog : BottomSheetDialogFragment(), PlaylistAdapter.O
behavior = BottomSheetBehavior.from(view.parent as View)
val displayMetrics = DisplayMetrics()
requireActivity().windowManager.defaultDisplay.getMetrics(displayMetrics)
if(resources.getBoolean(R.bool.isTablet) || resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE){
behavior.state = BottomSheetBehavior.STATE_EXPANDED
behavior.peekHeight = displayMetrics.heightPixels
}
behavior.state = BottomSheetBehavior.STATE_EXPANDED
behavior.peekHeight = displayMetrics.heightPixels
}
val progress = view.findViewById<LinearProgressIndicator>(R.id.loadingItemsProgress)

View file

@ -18,14 +18,14 @@
android:id="@+id/bottomAppBar"
style="@style/Widget.Material3.BottomAppBar"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_height="wrap_content"
app:menu="@menu/select_playlist_menu"
android:layout_gravity="bottom">
<LinearLayout
android:layout_width="wrap_content"
android:layout_marginStart="50dp"
android:layout_marginTop="10dp"
android:layout_marginVertical="10dp"
android:layout_height="wrap_content">
<com.google.android.material.textfield.TextInputLayout
@ -33,7 +33,6 @@
style="@style/Widget.Material3.TextInputLayout.FilledBox.Dense"
android:layout_width="70dp"
android:layout_height="wrap_content"
app:errorEnabled="true"
android:layout_marginEnd="10dp"
android:hint="@string/start">
@ -51,7 +50,6 @@
android:layout_width="70dp"
android:layout_height="wrap_content"
android:hint="@string/end"
app:errorEnabled="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/colon">