summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Lombardo <clombardo169@gmail.com>2023-04-24 01:43:09 +0200
committerbunnei <bunneidev@gmail.com>2023-06-03 09:05:54 +0200
commit033adb9723b9e4c00ccbeda52d46a596d1faae89 (patch)
treeeedef97dd3e73c97a42ba62448e8ef3aef26fcd4
parentandroid: Disable editing themes during emulation (diff)
downloadyuzu-033adb9723b9e4c00ccbeda52d46a596d1faae89.tar
yuzu-033adb9723b9e4c00ccbeda52d46a596d1faae89.tar.gz
yuzu-033adb9723b9e4c00ccbeda52d46a596d1faae89.tar.bz2
yuzu-033adb9723b9e4c00ccbeda52d46a596d1faae89.tar.lz
yuzu-033adb9723b9e4c00ccbeda52d46a596d1faae89.tar.xz
yuzu-033adb9723b9e4c00ccbeda52d46a596d1faae89.tar.zst
yuzu-033adb9723b9e4c00ccbeda52d46a596d1faae89.zip
Diffstat (limited to '')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt14
-rw-r--r--src/android/app/src/main/res/layout/activity_settings.xml9
2 files changed, 20 insertions, 3 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt
index e4bdcc991..a92fc1075 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt
@@ -8,6 +8,7 @@ import android.content.Intent
import android.os.Bundle
import android.view.Menu
import android.view.View
+import android.view.ViewGroup
import android.widget.Toast
import androidx.activity.viewModels
import androidx.appcompat.app.AppCompatActivity
@@ -51,9 +52,11 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView {
setSupportActionBar(binding.toolbarSettings)
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
- ThemeHelper.setNavigationBarColor(
- this,
- MaterialColors.getColor(window.decorView, R.attr.colorSurface)
+ binding.navigationBarShade.setBackgroundColor(
+ ThemeHelper.getColorWithOpacity(
+ MaterialColors.getColor(binding.navigationBarShade, R.attr.colorSurface),
+ ThemeHelper.SYSTEM_BAR_ALPHA
+ )
)
setInsets()
@@ -164,6 +167,11 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView {
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
view.updatePadding(left = insets.left, right = insets.right)
InsetsHelper.insetAppBar(insets, binding.appbarSettings)
+
+ val mlpShade = binding.navigationBarShade.layoutParams as ViewGroup.MarginLayoutParams
+ mlpShade.height = insets.bottom
+ binding.navigationBarShade.layoutParams = mlpShade
+
windowInsets
}
}
diff --git a/src/android/app/src/main/res/layout/activity_settings.xml b/src/android/app/src/main/res/layout/activity_settings.xml
index 2745599f4..b72aee03c 100644
--- a/src/android/app/src/main/res/layout/activity_settings.xml
+++ b/src/android/app/src/main/res/layout/activity_settings.xml
@@ -26,4 +26,13 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
+ <View
+ android:id="@+id/navigation_bar_shade"
+ android:layout_width="match_parent"
+ android:layout_height="1px"
+ android:background="@android:color/transparent"
+ android:clickable="false"
+ android:focusable="false"
+ android:layout_gravity="bottom|center_horizontal" />
+
</androidx.coordinatorlayout.widget.CoordinatorLayout>