mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
Android: Take RTL layout into account for menu animations
This commit is contained in:
parent
32061c95d4
commit
ac17e49243
@ -491,10 +491,10 @@ public final class EmulationActivity extends AppCompatActivity
|
||||
Fragment fragment = MenuFragment.newInstance(mSelectedTitle);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.setCustomAnimations(
|
||||
R.animator.menu_slide_in_from_left,
|
||||
R.animator.menu_slide_out_to_left,
|
||||
R.animator.menu_slide_in_from_left,
|
||||
R.animator.menu_slide_out_to_left)
|
||||
R.animator.menu_slide_in_from_start,
|
||||
R.animator.menu_slide_out_to_start,
|
||||
R.animator.menu_slide_in_from_start,
|
||||
R.animator.menu_slide_out_to_start)
|
||||
.add(R.id.frame_menu, fragment)
|
||||
.addToBackStack(BACKSTACK_NAME_MENU)
|
||||
.commit();
|
||||
@ -1235,10 +1235,10 @@ public final class EmulationActivity extends AppCompatActivity
|
||||
Fragment fragment = SaveLoadStateFragment.newInstance(saveOrLoad);
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.setCustomAnimations(
|
||||
R.animator.menu_slide_in_from_right,
|
||||
R.animator.menu_slide_out_to_right,
|
||||
R.animator.menu_slide_in_from_right,
|
||||
R.animator.menu_slide_out_to_right)
|
||||
R.animator.menu_slide_in_from_end,
|
||||
R.animator.menu_slide_out_to_end,
|
||||
R.animator.menu_slide_in_from_end,
|
||||
R.animator.menu_slide_out_to_end)
|
||||
.replace(R.id.frame_submenu, fragment)
|
||||
.addToBackStack(BACKSTACK_NAME_SUBMENU)
|
||||
.commit();
|
||||
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<objectAnimator
|
||||
android:propertyName="translationX"
|
||||
android:valueType="floatType"
|
||||
android:valueFrom="-1280dp"
|
||||
android:valueTo="0"
|
||||
android:interpolator="@android:interpolator/decelerate_quad"
|
||||
android:duration="300"/>
|
||||
|
||||
<objectAnimator
|
||||
android:propertyName="alpha"
|
||||
android:valueType="floatType"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="1"
|
||||
android:interpolator="@android:interpolator/accelerate_quad"
|
||||
android:duration="300"/>
|
||||
|
||||
</set>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<objectAnimator
|
||||
android:propertyName="translationX"
|
||||
android:valueType="floatType"
|
||||
android:valueFrom="1280dp"
|
||||
android:valueTo="0"
|
||||
android:interpolator="@android:interpolator/decelerate_quad"
|
||||
android:duration="300"/>
|
||||
|
||||
<objectAnimator
|
||||
android:propertyName="alpha"
|
||||
android:valueType="floatType"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="1"
|
||||
android:interpolator="@android:interpolator/accelerate_quad"
|
||||
android:duration="300"/>
|
||||
|
||||
</set>
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- This animation is used ONLY when a submenu is replaced. -->
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:propertyName="translationX"
|
||||
android:valueType="floatType"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="-1280dp"
|
||||
android:interpolator="@android:interpolator/decelerate_quad"
|
||||
android:duration="200"/>
|
||||
|
||||
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:propertyName="alpha"
|
||||
android:valueType="floatType"
|
||||
android:valueFrom="1"
|
||||
android:valueTo="0"
|
||||
android:interpolator="@android:interpolator/decelerate_quad"
|
||||
android:duration="200"/>
|
||||
|
||||
</set>
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- This animation is used ONLY when a submenu is replaced. -->
|
||||
<objectAnimator
|
||||
android:propertyName="translationX"
|
||||
android:valueType="floatType"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="1280dp"
|
||||
android:interpolator="@android:interpolator/decelerate_quad"
|
||||
android:duration="200"/>
|
||||
|
||||
<objectAnimator
|
||||
android:propertyName="alpha"
|
||||
android:valueType="floatType"
|
||||
android:valueFrom="1"
|
||||
android:valueTo="0"
|
||||
android:interpolator="@android:interpolator/decelerate_quad"
|
||||
android:duration="200"/>
|
||||
|
||||
</set>
|
Loading…
x
Reference in New Issue
Block a user