mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 06:51:17 +01:00
Merge pull request #11044 from t895/dialog-animations
Android: Add custom window animation to alert dialogs
This commit is contained in:
commit
702e7bad58
18
Source/Android/app/src/main/res/anim/fade_in.xml
Normal file
18
Source/Android/app/src/main/res/anim/fade_in.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?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" />
|
||||
|
||||
<scale
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:interpolator="@android:anim/decelerate_interpolator"
|
||||
android:fromXScale="0.95"
|
||||
android:fromYScale="0.95"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
android:toXScale="1.0"
|
||||
android:toYScale="1.0" />
|
||||
</set>
|
18
Source/Android/app/src/main/res/anim/fade_out.xml
Normal file
18
Source/Android/app/src/main/res/anim/fade_out.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?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" />
|
||||
|
||||
<scale
|
||||
android:duration="@android:integer/config_shortAnimTime"
|
||||
android:interpolator="@android:anim/decelerate_interpolator"
|
||||
android:fromXScale="1.0"
|
||||
android:fromYScale="1.0"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
android:toXScale="0.95"
|
||||
android:toYScale="0.95" />
|
||||
</set>
|
@ -27,7 +27,7 @@
|
||||
<item name="android:colorControlHighlight">@color/m3_sys_color_dynamic_dark_on_surface_variant</item>
|
||||
<item name="android:colorEdgeEffect">@color/m3_sys_color_dynamic_dark_secondary</item>
|
||||
|
||||
<item name="materialAlertDialogTheme">@style/ThemeOverlay.Material3.MaterialAlertDialog</item>
|
||||
<item name="materialAlertDialogTheme">@style/MaterialDialog</item>
|
||||
<item name="popupTheme">@style/ThemeOverlay.Material3</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<item name="android:colorControlHighlight">@color/m3_sys_color_dynamic_light_on_surface_variant</item>
|
||||
<item name="android:colorEdgeEffect">@color/m3_sys_color_dynamic_light_secondary</item>
|
||||
|
||||
<item name="materialAlertDialogTheme">@style/ThemeOverlay.Material3.MaterialAlertDialog</item>
|
||||
<item name="materialAlertDialogTheme">@style/MaterialDialog</item>
|
||||
<item name="popupTheme">@style/ThemeOverlay.Material3</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
@ -33,6 +33,16 @@
|
||||
<item name="buttonBarPositiveButtonStyle">@style/DolphinButton</item>
|
||||
<item name="buttonBarNegativeButtonStyle">@style/DolphinButton</item>
|
||||
<item name="buttonBarNeutralButtonStyle">@style/DolphinButton</item>
|
||||
<item name="android:windowAnimationStyle">@style/DialogAnimation</item>
|
||||
</style>
|
||||
|
||||
<style name="MaterialDialog" parent="ThemeOverlay.Material3.MaterialAlertDialog">
|
||||
<item name="android:windowAnimationStyle">@style/DialogAnimation</item>
|
||||
</style>
|
||||
|
||||
<style name="DialogAnimation">
|
||||
<item name="android:windowEnterAnimation">@anim/fade_in</item>
|
||||
<item name="android:windowExitAnimation">@anim/fade_out</item>
|
||||
</style>
|
||||
|
||||
<style name="DolphinTVDialog" parent="Theme.Material3.DayNight.Dialog.Alert">
|
||||
|
@ -60,7 +60,7 @@
|
||||
<item name="colorPrimaryContainer">@color/dolphin_primaryContainer</item>
|
||||
<item name="colorOnPrimaryContainer">@color/dolphin_onPrimaryContainer</item>
|
||||
|
||||
<item name="materialAlertDialogTheme">@style/ThemeOverlay.Material3.MaterialAlertDialog</item>
|
||||
<item name="materialAlertDialogTheme">@style/MaterialDialog</item>
|
||||
<item name="popupTheme">@style/ThemeOverlay.Material3</item>
|
||||
</style>
|
||||
|
||||
@ -94,7 +94,7 @@
|
||||
<item name="android:colorControlHighlight">@color/green_onSurfaceVariant</item>
|
||||
<item name="android:colorEdgeEffect">@color/green_secondary</item>
|
||||
|
||||
<item name="materialAlertDialogTheme">@style/ThemeOverlay.Material3.MaterialAlertDialog</item>
|
||||
<item name="materialAlertDialogTheme">@style/MaterialDialog</item>
|
||||
<item name="popupTheme">@style/ThemeOverlay.Material3</item>
|
||||
</style>
|
||||
|
||||
@ -128,7 +128,7 @@
|
||||
<item name="android:colorControlHighlight">@color/pink_onSurfaceVariant</item>
|
||||
<item name="android:colorEdgeEffect">@color/pink_secondary</item>
|
||||
|
||||
<item name="materialAlertDialogTheme">@style/ThemeOverlay.Material3.MaterialAlertDialog</item>
|
||||
<item name="materialAlertDialogTheme">@style/MaterialDialog</item>
|
||||
<item name="popupTheme">@style/ThemeOverlay.Material3</item>
|
||||
</style>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user