From ac17e49243c670d5ac3466575e1b2a9e3912b3c8 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 17 Aug 2020 19:37:05 +0200 Subject: [PATCH] Android: Take RTL layout into account for menu animations --- .../activities/EmulationActivity.java | 16 +++++++------- .../animator-ldrtl/menu_slide_in_from_end.xml | 20 ++++++++++++++++++ .../menu_slide_in_from_start.xml | 20 ++++++++++++++++++ .../animator-ldrtl/menu_slide_out_to_end.xml | 21 +++++++++++++++++++ .../menu_slide_out_to_start.xml | 21 +++++++++++++++++++ ...m_right.xml => menu_slide_in_from_end.xml} | 0 ..._left.xml => menu_slide_in_from_start.xml} | 0 ...to_right.xml => menu_slide_out_to_end.xml} | 0 ...o_left.xml => menu_slide_out_to_start.xml} | 0 9 files changed, 90 insertions(+), 8 deletions(-) create mode 100644 Source/Android/app/src/main/res/animator-ldrtl/menu_slide_in_from_end.xml create mode 100644 Source/Android/app/src/main/res/animator-ldrtl/menu_slide_in_from_start.xml create mode 100644 Source/Android/app/src/main/res/animator-ldrtl/menu_slide_out_to_end.xml create mode 100644 Source/Android/app/src/main/res/animator-ldrtl/menu_slide_out_to_start.xml rename Source/Android/app/src/main/res/animator/{menu_slide_in_from_right.xml => menu_slide_in_from_end.xml} (100%) rename Source/Android/app/src/main/res/animator/{menu_slide_in_from_left.xml => menu_slide_in_from_start.xml} (100%) rename Source/Android/app/src/main/res/animator/{menu_slide_out_to_right.xml => menu_slide_out_to_end.xml} (100%) rename Source/Android/app/src/main/res/animator/{menu_slide_out_to_left.xml => menu_slide_out_to_start.xml} (100%) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java index 2bed26a973..72f39dbe23 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java @@ -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(); diff --git a/Source/Android/app/src/main/res/animator-ldrtl/menu_slide_in_from_end.xml b/Source/Android/app/src/main/res/animator-ldrtl/menu_slide_in_from_end.xml new file mode 100644 index 0000000000..cdd11fc2d9 --- /dev/null +++ b/Source/Android/app/src/main/res/animator-ldrtl/menu_slide_in_from_end.xml @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/Source/Android/app/src/main/res/animator-ldrtl/menu_slide_in_from_start.xml b/Source/Android/app/src/main/res/animator-ldrtl/menu_slide_in_from_start.xml new file mode 100644 index 0000000000..2acbf1270c --- /dev/null +++ b/Source/Android/app/src/main/res/animator-ldrtl/menu_slide_in_from_start.xml @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/Source/Android/app/src/main/res/animator-ldrtl/menu_slide_out_to_end.xml b/Source/Android/app/src/main/res/animator-ldrtl/menu_slide_out_to_end.xml new file mode 100644 index 0000000000..eadf33156c --- /dev/null +++ b/Source/Android/app/src/main/res/animator-ldrtl/menu_slide_out_to_end.xml @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/Source/Android/app/src/main/res/animator-ldrtl/menu_slide_out_to_start.xml b/Source/Android/app/src/main/res/animator-ldrtl/menu_slide_out_to_start.xml new file mode 100644 index 0000000000..d650237d6f --- /dev/null +++ b/Source/Android/app/src/main/res/animator-ldrtl/menu_slide_out_to_start.xml @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/Source/Android/app/src/main/res/animator/menu_slide_in_from_right.xml b/Source/Android/app/src/main/res/animator/menu_slide_in_from_end.xml similarity index 100% rename from Source/Android/app/src/main/res/animator/menu_slide_in_from_right.xml rename to Source/Android/app/src/main/res/animator/menu_slide_in_from_end.xml diff --git a/Source/Android/app/src/main/res/animator/menu_slide_in_from_left.xml b/Source/Android/app/src/main/res/animator/menu_slide_in_from_start.xml similarity index 100% rename from Source/Android/app/src/main/res/animator/menu_slide_in_from_left.xml rename to Source/Android/app/src/main/res/animator/menu_slide_in_from_start.xml diff --git a/Source/Android/app/src/main/res/animator/menu_slide_out_to_right.xml b/Source/Android/app/src/main/res/animator/menu_slide_out_to_end.xml similarity index 100% rename from Source/Android/app/src/main/res/animator/menu_slide_out_to_right.xml rename to Source/Android/app/src/main/res/animator/menu_slide_out_to_end.xml diff --git a/Source/Android/app/src/main/res/animator/menu_slide_out_to_left.xml b/Source/Android/app/src/main/res/animator/menu_slide_out_to_start.xml similarity index 100% rename from Source/Android/app/src/main/res/animator/menu_slide_out_to_left.xml rename to Source/Android/app/src/main/res/animator/menu_slide_out_to_start.xml