Skip to content

Commit

Permalink
SuppressLint error because of PrivateResourece usage
Browse files Browse the repository at this point in the history
  • Loading branch information
hamorillo committed Nov 29, 2024
1 parent 88db689 commit 79687ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -966,12 +966,14 @@ class MainActivity :
return binding.snackbarFragment
}

@SuppressLint("PrivateResource")
override fun onMiniPlayerHidden() {
val padding = resources.getDimension(MR.dimen.design_bottom_navigation_height).toInt()
binding.snackbarFragment.updatePadding(bottom = padding)
settings.updateBottomInset(0)
}

@SuppressLint("PrivateResource")
override fun onMiniPlayerVisible() {
val miniPlayerHeight = resources.getDimension(R.dimen.miniPlayerHeight).toInt()
val padding = resources.getDimension(MR.dimen.design_bottom_navigation_height).toInt() + miniPlayerHeight
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root">

<androidx.coordinatorlayout.widget.CoordinatorLayout
Expand All @@ -15,7 +16,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/design_bottom_navigation_height"
android:clipToPadding="false" />
android:clipToPadding="false"
tools:ignore="PrivateResource" />

<!-- Hack: the only way to get the Snackbar in front of the bottom navigation view -->
<androidx.coordinatorlayout.widget.CoordinatorLayout
Expand Down

0 comments on commit 79687ff

Please sign in to comment.