diff options
author | Charles Lombardo <clombardo169@gmail.com> | 2023-05-01 10:43:04 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2023-06-03 09:05:58 +0200 |
commit | 09e7b14d0ead361c56579d8491015320251bb043 (patch) | |
tree | 17f65a3b9d8f39f4eaa9c78e2e81d438f194b062 /src | |
parent | android: Sort games alphabetically by default (diff) | |
download | yuzu-09e7b14d0ead361c56579d8491015320251bb043.tar yuzu-09e7b14d0ead361c56579d8491015320251bb043.tar.gz yuzu-09e7b14d0ead361c56579d8491015320251bb043.tar.bz2 yuzu-09e7b14d0ead361c56579d8491015320251bb043.tar.lz yuzu-09e7b14d0ead361c56579d8491015320251bb043.tar.xz yuzu-09e7b14d0ead361c56579d8491015320251bb043.tar.zst yuzu-09e7b14d0ead361c56579d8491015320251bb043.zip |
Diffstat (limited to 'src')
3 files changed, 23 insertions, 3 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt index c620c3c7c..5fafc2d2d 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/main/MainActivity.kt @@ -148,17 +148,29 @@ class MainActivity : AppCompatActivity(), ThemeProvider { return } + val smallLayout = resources.getBoolean(R.bool.small_layout) binding.navigationView.animate().apply { if (visible) { binding.navigationView.visibility = View.VISIBLE - binding.navigationView.translationY = binding.navigationView.height.toFloat() * 2 duration = 300 - translationY(0f) interpolator = PathInterpolator(0.05f, 0.7f, 0.1f, 1f) + + if (smallLayout) { + binding.navigationView.translationY = binding.navigationView.height.toFloat() * 2 + translationY(0f) + } else { + binding.navigationView.translationX = binding.navigationView.width.toFloat() * -2 + translationX(0f) + } } else { duration = 300 - translationY(binding.navigationView.height.toFloat() * 2) interpolator = PathInterpolator(0.3f, 0f, 0.8f, 0.15f) + + if (smallLayout) { + translationY(binding.navigationView.height.toFloat() * 2) + } else { + translationX(binding.navigationView.width.toFloat() * -2) + } } }.withEndAction { if (!visible) { diff --git a/src/android/app/src/main/res/values-w600dp/bools.xml b/src/android/app/src/main/res/values-w600dp/bools.xml new file mode 100644 index 000000000..b6833a702 --- /dev/null +++ b/src/android/app/src/main/res/values-w600dp/bools.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <bool name="small_layout">false</bool> +</resources> diff --git a/src/android/app/src/main/res/values/bools.xml b/src/android/app/src/main/res/values/bools.xml new file mode 100644 index 000000000..e50f473fb --- /dev/null +++ b/src/android/app/src/main/res/values/bools.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <bool name="small_layout">true</bool> +</resources> |