mirror of
https://github.com/Michatec/Radio.git
synced 2026-06-03 13:30:29 +02:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user