From f446ae9ebefda1572e54523435b4af9616c196d7 Mon Sep 17 00:00:00 2001 From: deniscerri <64997243+deniscerri@users.noreply.github.com> Date: Tue, 1 Apr 2025 19:26:48 +0200 Subject: [PATCH] fix select playlist items bottom app bar --- .../ytdl/ui/downloadcard/SelectPlaylistItemsDialog.kt | 6 ++---- app/src/main/res/layout/select_playlist_items.xml | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/deniscerri/ytdl/ui/downloadcard/SelectPlaylistItemsDialog.kt b/app/src/main/java/com/deniscerri/ytdl/ui/downloadcard/SelectPlaylistItemsDialog.kt index 159d4c9d..3517c7f3 100644 --- a/app/src/main/java/com/deniscerri/ytdl/ui/downloadcard/SelectPlaylistItemsDialog.kt +++ b/app/src/main/java/com/deniscerri/ytdl/ui/downloadcard/SelectPlaylistItemsDialog.kt @@ -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(R.id.loadingItemsProgress) diff --git a/app/src/main/res/layout/select_playlist_items.xml b/app/src/main/res/layout/select_playlist_items.xml index 9223fd67..98b1044f 100644 --- a/app/src/main/res/layout/select_playlist_items.xml +++ b/app/src/main/res/layout/select_playlist_items.xml @@ -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"> @@ -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">