summaryrefslogtreecommitdiffhomepage
path: root/android/src/main
diff options
context:
space:
mode:
authorAleksandr Granin <aleksandr@mullvad.net>2021-02-03 14:30:16 +0100
committerAleksandr Granin <aleksandr@mullvad.net>2021-02-12 14:19:30 +0100
commit783bcc46c4271d81037a796c94d6dbf775569846 (patch)
treecf70ed6584c36f8f53c021c1a6b85b614bc0a44d /android/src/main
parent6718bb1fe72734bddf3cf42520851a9ed785aec1 (diff)
downloadmullvadvpn-783bcc46c4271d81037a796c94d6dbf775569846.tar.xz
mullvadvpn-783bcc46c4271d81037a796c94d6dbf775569846.zip
Move transition animation duration to resources
Diffstat (limited to 'android/src/main')
-rw-r--r--android/src/main/res/anim/do_nothing.xml2
-rw-r--r--android/src/main/res/anim/fade_in.xml2
-rw-r--r--android/src/main/res/anim/fade_out.xml2
-rw-r--r--android/src/main/res/anim/fragment_enter_from_bottom.xml2
-rw-r--r--android/src/main/res/anim/fragment_enter_from_right.xml2
-rw-r--r--android/src/main/res/anim/fragment_exit_to_bottom.xml2
-rw-r--r--android/src/main/res/anim/fragment_exit_to_right.xml2
-rw-r--r--android/src/main/res/anim/fragment_half_enter_from_left.xml2
-rw-r--r--android/src/main/res/anim/fragment_half_exit_to_left.xml2
-rw-r--r--android/src/main/res/values/integers.xml4
10 files changed, 13 insertions, 9 deletions
diff --git a/android/src/main/res/anim/do_nothing.xml b/android/src/main/res/anim/do_nothing.xml
index 7c0037b9b7..8cb6866d6d 100644
--- a/android/src/main/res/anim/do_nothing.xml
+++ b/android/src/main/res/anim/do_nothing.xml
@@ -2,5 +2,5 @@
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="0"
android:toYDelta="0"
- android:duration="450" />
+ android:duration="@integer/transition_animation_duration" />
</set>
diff --git a/android/src/main/res/anim/fade_in.xml b/android/src/main/res/anim/fade_in.xml
index 0bc6d1bdd6..d9b78f9197 100644
--- a/android/src/main/res/anim/fade_in.xml
+++ b/android/src/main/res/anim/fade_in.xml
@@ -2,5 +2,5 @@
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha android:fromAlpha="0.0"
android:toAlpha="1.0"
- android:duration="450" />
+ android:duration="@integer/transition_animation_duration" />
</set>
diff --git a/android/src/main/res/anim/fade_out.xml b/android/src/main/res/anim/fade_out.xml
index 80e9c0fe92..7c164cb338 100644
--- a/android/src/main/res/anim/fade_out.xml
+++ b/android/src/main/res/anim/fade_out.xml
@@ -2,5 +2,5 @@
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha android:fromAlpha="1.0"
android:toAlpha="0.0"
- android:duration="450" />
+ android:duration="@integer/transition_animation_duration" />
</set>
diff --git a/android/src/main/res/anim/fragment_enter_from_bottom.xml b/android/src/main/res/anim/fragment_enter_from_bottom.xml
index 783d5b5021..337392e881 100644
--- a/android/src/main/res/anim/fragment_enter_from_bottom.xml
+++ b/android/src/main/res/anim/fragment_enter_from_bottom.xml
@@ -2,5 +2,5 @@
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="100%p"
android:toYDelta="0"
- android:duration="450" />
+ android:duration="@integer/transition_animation_duration" />
</set>
diff --git a/android/src/main/res/anim/fragment_enter_from_right.xml b/android/src/main/res/anim/fragment_enter_from_right.xml
index 654cfcbf02..5ba3b5c3f8 100644
--- a/android/src/main/res/anim/fragment_enter_from_right.xml
+++ b/android/src/main/res/anim/fragment_enter_from_right.xml
@@ -2,5 +2,5 @@
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="100%p"
android:toXDelta="0"
- android:duration="450" />
+ android:duration="@integer/transition_animation_duration" />
</set>
diff --git a/android/src/main/res/anim/fragment_exit_to_bottom.xml b/android/src/main/res/anim/fragment_exit_to_bottom.xml
index 7c94e143d8..dc1261114a 100644
--- a/android/src/main/res/anim/fragment_exit_to_bottom.xml
+++ b/android/src/main/res/anim/fragment_exit_to_bottom.xml
@@ -2,5 +2,5 @@
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="0"
android:toYDelta="100%p"
- android:duration="450" />
+ android:duration="@integer/transition_animation_duration" />
</set>
diff --git a/android/src/main/res/anim/fragment_exit_to_right.xml b/android/src/main/res/anim/fragment_exit_to_right.xml
index 6175e53215..d794200982 100644
--- a/android/src/main/res/anim/fragment_exit_to_right.xml
+++ b/android/src/main/res/anim/fragment_exit_to_right.xml
@@ -2,5 +2,5 @@
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0"
android:toXDelta="100%p"
- android:duration="450" />
+ android:duration="@integer/transition_animation_duration" />
</set>
diff --git a/android/src/main/res/anim/fragment_half_enter_from_left.xml b/android/src/main/res/anim/fragment_half_enter_from_left.xml
index d4e56b1e5d..67e7b7364e 100644
--- a/android/src/main/res/anim/fragment_half_enter_from_left.xml
+++ b/android/src/main/res/anim/fragment_half_enter_from_left.xml
@@ -2,5 +2,5 @@
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="-50%p"
android:toXDelta="0"
- android:duration="450" />
+ android:duration="@integer/transition_animation_duration" />
</set>
diff --git a/android/src/main/res/anim/fragment_half_exit_to_left.xml b/android/src/main/res/anim/fragment_half_exit_to_left.xml
index c50c5e7ebc..bfac81df2e 100644
--- a/android/src/main/res/anim/fragment_half_exit_to_left.xml
+++ b/android/src/main/res/anim/fragment_half_exit_to_left.xml
@@ -2,5 +2,5 @@
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromXDelta="0%p"
android:toXDelta="-50%p"
- android:duration="450" />
+ android:duration="@integer/transition_animation_duration" />
</set>
diff --git a/android/src/main/res/values/integers.xml b/android/src/main/res/values/integers.xml
new file mode 100644
index 0000000000..1ae43d4d23
--- /dev/null
+++ b/android/src/main/res/values/integers.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <integer name="transition_animation_duration">450</integer>
+</resources>