summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsActivity.kt8
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFrameLayout.kt46
-rw-r--r--src/android/app/src/main/res/anim-ldrtl/anim_pop_settings_fragment_out.xml16
-rw-r--r--src/android/app/src/main/res/anim-ldrtl/anim_settings_fragment_in.xml16
-rw-r--r--src/android/app/src/main/res/anim/anim_pop_settings_fragment_out.xml16
-rw-r--r--src/android/app/src/main/res/anim/anim_settings_fragment_in.xml16
-rw-r--r--src/android/app/src/main/res/anim/anim_settings_fragment_out.xml10
-rw-r--r--src/android/app/src/main/res/animator/settings_enter.xml28
-rw-r--r--src/android/app/src/main/res/animator/settings_exit.xml28
-rw-r--r--src/android/app/src/main/res/animator/settings_pop_enter.xml28
-rw-r--r--src/android/app/src/main/res/animator/setttings_pop_exit.xml27
-rw-r--r--src/android/app/src/main/res/layout/fragment_settings.xml4
12 files changed, 80 insertions, 163 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 e403aa6d7..1fa7b2e0b 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
@@ -97,10 +97,10 @@ class SettingsActivity : AppCompatActivity(), SettingsActivityView {
if (addToStack) {
if (areSystemAnimationsEnabled()) {
transaction.setCustomAnimations(
- R.animator.settings_enter,
- R.animator.settings_exit,
- R.animator.settings_pop_enter,
- R.animator.setttings_pop_exit
+ R.anim.anim_settings_fragment_in,
+ R.anim.anim_settings_fragment_out,
+ 0,
+ R.anim.anim_pop_settings_fragment_out
)
}
transaction.addToBackStack(null)
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFrameLayout.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFrameLayout.kt
deleted file mode 100644
index c9918d608..000000000
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFrameLayout.kt
+++ /dev/null
@@ -1,46 +0,0 @@
-// SPDX-FileCopyrightText: 2023 yuzu Emulator Project
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-package org.yuzu.yuzu_emu.features.settings.ui
-
-import android.content.Context
-import android.util.AttributeSet
-import android.widget.FrameLayout
-
-/**
- * FrameLayout subclass with few Properties added to simplify animations.
- * Don't remove the methods appearing as unused, in order not to break the menu animations
- */
-class SettingsFrameLayout : FrameLayout {
- private val mVisibleness = 1.0f
-
- constructor(context: Context?) : super(context!!)
- constructor(context: Context?, attrs: AttributeSet?) : super(context!!, attrs)
-
- constructor(
- context: Context?,
- attrs: AttributeSet?,
- defStyleAttr: Int
- ) : super(context!!, attrs, defStyleAttr)
-
- constructor(
- context: Context?,
- attrs: AttributeSet?,
- defStyleAttr: Int,
- defStyleRes: Int
- ) : super(context!!, attrs, defStyleAttr, defStyleRes)
-
- var yFraction: Float
- get() = y / height
- set(yFraction) {
- val height = height
- y = (if (height > 0) yFraction * height else -9999) as Float
- }
- var visibleness: Float
- get() = mVisibleness
- set(visibleness) {
- scaleX = visibleness
- scaleY = visibleness
- alpha = visibleness
- }
-}
diff --git a/src/android/app/src/main/res/anim-ldrtl/anim_pop_settings_fragment_out.xml b/src/android/app/src/main/res/anim-ldrtl/anim_pop_settings_fragment_out.xml
new file mode 100644
index 000000000..9f49c133a
--- /dev/null
+++ b/src/android/app/src/main/res/anim-ldrtl/anim_pop_settings_fragment_out.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <alpha
+ android:duration="125"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromAlpha="1"
+ android:toAlpha="0" />
+
+ <translate
+ android:duration="125"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromXDelta="0"
+ android:toXDelta="-75" />
+
+</set>
diff --git a/src/android/app/src/main/res/anim-ldrtl/anim_settings_fragment_in.xml b/src/android/app/src/main/res/anim-ldrtl/anim_settings_fragment_in.xml
new file mode 100644
index 000000000..82fd719db
--- /dev/null
+++ b/src/android/app/src/main/res/anim-ldrtl/anim_settings_fragment_in.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <alpha
+ android:duration="@android:integer/config_shortAnimTime"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromAlpha="0"
+ android:toAlpha="1" />
+
+ <translate
+ android:duration="@android:integer/config_shortAnimTime"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromXDelta="-200"
+ android:toXDelta="0" />
+
+</set>
diff --git a/src/android/app/src/main/res/anim/anim_pop_settings_fragment_out.xml b/src/android/app/src/main/res/anim/anim_pop_settings_fragment_out.xml
new file mode 100644
index 000000000..5892128f1
--- /dev/null
+++ b/src/android/app/src/main/res/anim/anim_pop_settings_fragment_out.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <alpha
+ android:duration="125"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromAlpha="1"
+ android:toAlpha="0" />
+
+ <translate
+ android:duration="125"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromXDelta="0"
+ android:toXDelta="75" />
+
+</set>
diff --git a/src/android/app/src/main/res/anim/anim_settings_fragment_in.xml b/src/android/app/src/main/res/anim/anim_settings_fragment_in.xml
new file mode 100644
index 000000000..98e0cf8bd
--- /dev/null
+++ b/src/android/app/src/main/res/anim/anim_settings_fragment_in.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <alpha
+ android:duration="@android:integer/config_shortAnimTime"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromAlpha="0"
+ android:toAlpha="1" />
+
+ <translate
+ android:duration="@android:integer/config_shortAnimTime"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromXDelta="200"
+ android:toXDelta="0" />
+
+</set>
diff --git a/src/android/app/src/main/res/anim/anim_settings_fragment_out.xml b/src/android/app/src/main/res/anim/anim_settings_fragment_out.xml
new file mode 100644
index 000000000..77a40a4d1
--- /dev/null
+++ b/src/android/app/src/main/res/anim/anim_settings_fragment_out.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <alpha
+ android:duration="@android:integer/config_shortAnimTime"
+ android:interpolator="@android:anim/decelerate_interpolator"
+ android:fromAlpha="1"
+ android:toAlpha="0" />
+
+</set>
diff --git a/src/android/app/src/main/res/animator/settings_enter.xml b/src/android/app/src/main/res/animator/settings_enter.xml
deleted file mode 100644
index 3c216a054..000000000
--- a/src/android/app/src/main/res/animator/settings_enter.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<set xmlns:android="http://schemas.android.com/apk/res/android">
-
- <objectAnimator
- android:duration="@android:integer/config_mediumAnimTime"
- android:interpolator="@android:interpolator/decelerate_cubic"
- android:propertyName="yFraction"
- android:startOffset="@android:integer/config_shortAnimTime"
- android:valueFrom="1.0"
- android:valueTo="0" />
-
- <objectAnimator
- android:duration="@android:integer/config_mediumAnimTime"
- android:interpolator="@android:interpolator/decelerate_cubic"
- android:propertyName="translationZ"
- android:startOffset="@android:integer/config_shortAnimTime"
- android:valueFrom="100.0"
- android:valueTo="0" />
-
- <objectAnimator
- android:duration="@android:integer/config_mediumAnimTime"
- android:interpolator="@android:interpolator/decelerate_cubic"
- android:propertyName="elevation"
- android:startOffset="@android:integer/config_shortAnimTime"
- android:valueFrom="100.0"
- android:valueTo="0" />
-
-</set> \ No newline at end of file
diff --git a/src/android/app/src/main/res/animator/settings_exit.xml b/src/android/app/src/main/res/animator/settings_exit.xml
deleted file mode 100644
index a233b6757..000000000
--- a/src/android/app/src/main/res/animator/settings_exit.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<set xmlns:android="http://schemas.android.com/apk/res/android">
-
- <objectAnimator
- android:duration="@android:integer/config_mediumAnimTime"
- android:interpolator="@android:interpolator/accelerate_cubic"
- android:propertyName="visibleness"
- android:valueFrom="1.0f"
- android:valueTo="0.6f"
- android:valueType="floatType" />
-
- <objectAnimator
- android:duration="@android:integer/config_mediumAnimTime"
- android:interpolator="@android:interpolator/decelerate_cubic"
- android:propertyName="translationZ"
- android:startOffset="@android:integer/config_shortAnimTime"
- android:valueFrom="0"
- android:valueTo="-100.0" />
-
- <objectAnimator
- android:duration="@android:integer/config_mediumAnimTime"
- android:interpolator="@android:interpolator/decelerate_cubic"
- android:propertyName="elevation"
- android:startOffset="@android:integer/config_shortAnimTime"
- android:valueFrom="0"
- android:valueTo="-100.0" />
-
-</set> \ No newline at end of file
diff --git a/src/android/app/src/main/res/animator/settings_pop_enter.xml b/src/android/app/src/main/res/animator/settings_pop_enter.xml
deleted file mode 100644
index 080bc27c4..000000000
--- a/src/android/app/src/main/res/animator/settings_pop_enter.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<set xmlns:android="http://schemas.android.com/apk/res/android">
-
- <objectAnimator
- android:duration="@android:integer/config_mediumAnimTime"
- android:interpolator="@android:interpolator/decelerate_cubic"
- android:propertyName="visibleness"
- android:valueFrom="0.6f"
- android:valueTo="1.0f"
- android:valueType="floatType" />
-
- <objectAnimator
- android:duration="@android:integer/config_mediumAnimTime"
- android:interpolator="@android:interpolator/decelerate_cubic"
- android:propertyName="translationZ"
- android:startOffset="@android:integer/config_shortAnimTime"
- android:valueFrom="-100.0"
- android:valueTo="0" />
-
- <objectAnimator
- android:duration="@android:integer/config_mediumAnimTime"
- android:interpolator="@android:interpolator/decelerate_cubic"
- android:propertyName="elevation"
- android:startOffset="@android:integer/config_shortAnimTime"
- android:valueFrom="-100.0"
- android:valueTo="0" />
-
-</set> \ No newline at end of file
diff --git a/src/android/app/src/main/res/animator/setttings_pop_exit.xml b/src/android/app/src/main/res/animator/setttings_pop_exit.xml
deleted file mode 100644
index 4fccbcca2..000000000
--- a/src/android/app/src/main/res/animator/setttings_pop_exit.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<set xmlns:android="http://schemas.android.com/apk/res/android">
-
- <objectAnimator
- android:duration="@android:integer/config_mediumAnimTime"
- android:interpolator="@android:interpolator/accelerate_cubic"
- android:propertyName="yFraction"
- android:valueFrom="0"
- android:valueTo="1.0" />
-
- <objectAnimator
- android:duration="@android:integer/config_mediumAnimTime"
- android:interpolator="@android:interpolator/decelerate_cubic"
- android:propertyName="translationZ"
- android:startOffset="@android:integer/config_shortAnimTime"
- android:valueFrom="0.0"
- android:valueTo="100" />
-
- <objectAnimator
- android:duration="@android:integer/config_mediumAnimTime"
- android:interpolator="@android:interpolator/decelerate_cubic"
- android:propertyName="elevation"
- android:startOffset="@android:integer/config_shortAnimTime"
- android:valueFrom="0.0"
- android:valueTo="100" />
-
-</set> \ No newline at end of file
diff --git a/src/android/app/src/main/res/layout/fragment_settings.xml b/src/android/app/src/main/res/layout/fragment_settings.xml
index 6feb092ff..167720347 100644
--- a/src/android/app/src/main/res/layout/fragment_settings.xml
+++ b/src/android/app/src/main/res/layout/fragment_settings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<org.yuzu.yuzu_emu.features.settings.ui.SettingsFrameLayout
+<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
@@ -11,4 +11,4 @@
android:background="?attr/colorSurface"
android:clipToPadding="false" />
-</org.yuzu.yuzu_emu.features.settings.ui.SettingsFrameLayout>
+</FrameLayout>