refactor(ui): use anchor view for Snackbars above bottom sheet

Replace manual bottom margin adjustments with `setAnchorView` for Snackbars to ensure they are positioned correctly above the bottom sheet on mobile devices.

- In `LayoutHolder`, make `bottomSheet` public to allow access from other components.
- In `PlayerFragment` and `MainActivity`, replace `FrameLayout.LayoutParams` modifications with `setAnchorView(bottomSheet)`.
- Maintain standard Snackbar behavior for Android TV where the bottom sheet is not present.
This commit is contained in:
2026-05-31 23:06:57 +02:00
parent 83752c356f
commit 4429ed4057
3 changed files with 19 additions and 15 deletions
@@ -42,7 +42,7 @@ data class LayoutHolder(var rootView: View) {
/* Main class variables */
var recyclerView: RecyclerView = rootView.findViewById(R.id.station_list)
val layoutManager: LinearLayoutManager
private var bottomSheet: ConstraintLayout? = rootView.findViewById(R.id.bottom_sheet)
var bottomSheet: ConstraintLayout? = rootView.findViewById(R.id.bottom_sheet)
//private var sheetMetadataViews: Group
private var sleepTimerRunningViews: Group? = rootView.findViewById(R.id.sleep_timer_running_views)