yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

android: Persistent scrollbars on home settings fragment

This commit is contained in:
Charles Lombardo 2023-05-01 17:12:07 -04:00 committed by bunnei
parent f461465a92
commit 34b7d58157
2 changed files with 14 additions and 5 deletions

View File

@ -13,6 +13,7 @@ import android.provider.DocumentsContract
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.ViewGroup.MarginLayoutParams
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.core.app.ActivityCompat
@ -241,13 +242,19 @@ class HomeSettingsFragment : Fragment() {
val spacingNavigationRail =
resources.getDimensionPixelSize(R.dimen.spacing_navigation_rail)
binding.scrollViewSettings.setPadding(
barInsets.left + cutoutInsets.left,
barInsets.top,
barInsets.right + cutoutInsets.right,
barInsets.bottom
val leftInsets = barInsets.left + cutoutInsets.left
val rightInsets = barInsets.right + cutoutInsets.right
binding.scrollViewSettings.updatePadding(
top = barInsets.top,
bottom = barInsets.bottom
)
val mlpScrollSettings = binding.scrollViewSettings.layoutParams as MarginLayoutParams
mlpScrollSettings.leftMargin = leftInsets
mlpScrollSettings.rightMargin = rightInsets
binding.scrollViewSettings.layoutParams = mlpScrollSettings
binding.linearLayoutSettings.updatePadding(bottom = spacingNavigation)
if (ViewCompat.getLayoutDirection(view) == ViewCompat.LAYOUT_DIRECTION_LTR) {

View File

@ -5,6 +5,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:scrollbars="vertical"
android:fadeScrollbars="false"
android:clipToPadding="false">
<androidx.appcompat.widget.LinearLayoutCompat