mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-26 18:45:45 +01:00
android: Persistent scrollbars on home settings fragment
This commit is contained in:
parent
f461465a92
commit
34b7d58157
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user