aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorDocile-Alligator <chineseperson5@gmail.com>2020-07-09 16:35:24 +0000
committerGitHub <noreply@github.com>2020-07-09 16:35:24 +0000
commitbc8eea15ac737019a49bb721ba17897c3dcb9608 (patch)
tree173f2234b64b6b57b6ff9cdafdbc1cdbc0839ef6 /app/src
parent126cfa280e4282dc3b078f68a443940e8c12b075 (diff)
parentd03533b9b98cc5acdf4b77ab1aabdc31b27f7ada (diff)
downloadinfinity-for-reddit-bc8eea15ac737019a49bb721ba17897c3dcb9608.tar
infinity-for-reddit-bc8eea15ac737019a49bb721ba17897c3dcb9608.tar.gz
infinity-for-reddit-bc8eea15ac737019a49bb721ba17897c3dcb9608.tar.bz2
infinity-for-reddit-bc8eea15ac737019a49bb721ba17897c3dcb9608.tar.lz
infinity-for-reddit-bc8eea15ac737019a49bb721ba17897c3dcb9608.tar.xz
infinity-for-reddit-bc8eea15ac737019a49bb721ba17897c3dcb9608.tar.zst
infinity-for-reddit-bc8eea15ac737019a49bb721ba17897c3dcb9608.zip
Merge pull request #152 from OHermesJunior/preferences-anim
Add settings screen animations.
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SettingsActivity.java1
-rw-r--r--app/src/main/res/anim/enter_from_left.xml7
-rw-r--r--app/src/main/res/anim/enter_from_right.xml7
-rw-r--r--app/src/main/res/anim/exit_to_left.xml7
-rw-r--r--app/src/main/res/anim/exit_to_right.xml7
5 files changed, 29 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SettingsActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SettingsActivity.java
index 4a1be2c3..4e59c42b 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SettingsActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SettingsActivity.java
@@ -139,6 +139,7 @@ public class SettingsActivity extends BaseActivity implements
fragment.setTargetFragment(caller, 0);
getSupportFragmentManager().beginTransaction()
+ .setCustomAnimations(R.anim.enter_from_right, R.anim.exit_to_left, R.anim.enter_from_left, R.anim.exit_to_right)
.replace(R.id.frame_layout_settings_activity, fragment)
.addToBackStack(null)
.commit();
diff --git a/app/src/main/res/anim/enter_from_left.xml b/app/src/main/res/anim/enter_from_left.xml
new file mode 100644
index 00000000..63b97c30
--- /dev/null
+++ b/app/src/main/res/anim/enter_from_left.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <translate
+ android:duration="@android:integer/config_shortAnimTime"
+ android:fromXDelta="-100%"
+ android:toXDelta="0%" />
+</set>
diff --git a/app/src/main/res/anim/enter_from_right.xml b/app/src/main/res/anim/enter_from_right.xml
new file mode 100644
index 00000000..81e36503
--- /dev/null
+++ b/app/src/main/res/anim/enter_from_right.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <translate
+ android:duration="@android:integer/config_shortAnimTime"
+ android:fromXDelta="100%"
+ android:toXDelta="0%" />
+</set>
diff --git a/app/src/main/res/anim/exit_to_left.xml b/app/src/main/res/anim/exit_to_left.xml
new file mode 100644
index 00000000..c7860ef8
--- /dev/null
+++ b/app/src/main/res/anim/exit_to_left.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <translate
+ android:duration="@android:integer/config_shortAnimTime"
+ android:fromXDelta="0%"
+ android:toXDelta="-100%" />
+</set>
diff --git a/app/src/main/res/anim/exit_to_right.xml b/app/src/main/res/anim/exit_to_right.xml
new file mode 100644
index 00000000..0bb959fb
--- /dev/null
+++ b/app/src/main/res/anim/exit_to_right.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+ <translate
+ android:duration="@android:integer/config_shortAnimTime"
+ android:fromXDelta="0%"
+ android:toXDelta="100%" />
+</set>