summaryrefslogtreecommitdiffhomepage
path: root/android/src
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-08-12 20:17:54 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-08-18 12:50:23 +0000
commit076b496387f787bf42cbfd76f8a456fcdf783991 (patch)
treed05d7c06d25d90004c2a27f695dc70ac976f37a4 /android/src
parentbd942f2319d9b231201b8ad4756f5e71b2c30a79 (diff)
downloadmullvadvpn-076b496387f787bf42cbfd76f8a456fcdf783991.tar.xz
mullvadvpn-076b496387f787bf42cbfd76f8a456fcdf783991.zip
Create a dimension value for vertical spacing
Diffstat (limited to 'android/src')
-rw-r--r--android/src/main/res/layout/account.xml8
-rw-r--r--android/src/main/res/layout/advanced.xml6
-rw-r--r--android/src/main/res/layout/connect.xml3
-rw-r--r--android/src/main/res/layout/preferences.xml4
-rw-r--r--android/src/main/res/layout/problem_report.xml2
-rw-r--r--android/src/main/res/layout/select_location_header.xml2
-rw-r--r--android/src/main/res/layout/settings.xml9
-rw-r--r--android/src/main/res/layout/split_tunnelling_header.xml6
-rw-r--r--android/src/main/res/layout/welcome.xml1
-rw-r--r--android/src/main/res/layout/wireguard_key.xml8
-rw-r--r--android/src/main/res/values/dimensions.xml2
11 files changed, 28 insertions, 23 deletions
diff --git a/android/src/main/res/layout/account.xml b/android/src/main/res/layout/account.xml
index 3dc83b7745..c11e699ecc 100644
--- a/android/src/main/res/layout/account.xml
+++ b/android/src/main/res/layout/account.xml
@@ -39,7 +39,7 @@
<TextView android:id="@+id/expanded_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginBottom="12dp"
+ android:layout_marginBottom="@dimen/half_vertical_space"
android:layout_marginHorizontal="@dimen/side_margin"
android:text="@string/settings_account"
style="@style/SettingsExpandedHeader" />
@@ -47,7 +47,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/side_margin"
- android:paddingVertical="12dp"
+ android:paddingVertical="@dimen/half_vertical_space"
mullvad:clipboardLabel="@string/mullvad_account_number"
mullvad:copiedToast="@string/copied_mullvad_account_number"
mullvad:description="@string/account_number"
@@ -56,13 +56,13 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/side_margin"
- android:paddingVertical="12dp"
+ android:paddingVertical="@dimen/half_vertical_space"
mullvad:description="@string/paid_until"
mullvad:whenMissing="hide" />
<net.mullvad.mullvadvpn.ui.widget.UrlButton android:id="@+id/buy_credit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="12dp"
+ android:layout_marginTop="@dimen/half_vertical_space"
android:layout_marginHorizontal="@dimen/side_margin"
mullvad:showSpinner="true"
mullvad:url="@string/account_url"
diff --git a/android/src/main/res/layout/advanced.xml b/android/src/main/res/layout/advanced.xml
index 77b5574beb..61c9efc717 100644
--- a/android/src/main/res/layout/advanced.xml
+++ b/android/src/main/res/layout/advanced.xml
@@ -45,17 +45,17 @@
<net.mullvad.mullvadvpn.ui.widget.MtuCell android:id="@+id/wireguard_mtu"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="@dimen/vertical_space"
mullvad:text="@string/wireguard_mtu" />
<net.mullvad.mullvadvpn.ui.widget.NavigateCell android:id="@+id/wireguard_keys"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="@dimen/vertical_space"
mullvad:text="@string/wireguard_key" />
<net.mullvad.mullvadvpn.ui.widget.NavigateCell android:id="@+id/split_tunnelling"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="@dimen/vertical_space"
mullvad:text="@string/split_tunnelling" />
</LinearLayout>
</net.mullvad.mullvadvpn.ui.widget.ListenableScrollView>
diff --git a/android/src/main/res/layout/connect.xml b/android/src/main/res/layout/connect.xml
index 24a9b8d90f..b5f909f6f9 100644
--- a/android/src/main/res/layout/connect.xml
+++ b/android/src/main/res/layout/connect.xml
@@ -116,7 +116,8 @@
android:layout_weight="0"
android:orientation="vertical"
android:paddingHorizontal="@dimen/side_margin"
- android:paddingVertical="24dp">
+ android:paddingTop="@dimen/vertical_space"
+ android:paddingBottom="24dp">
<Button android:id="@+id/switch_location"
android:layout_marginTop="20dp"
android:layout_marginBottom="16dp"
diff --git a/android/src/main/res/layout/preferences.xml b/android/src/main/res/layout/preferences.xml
index b0891c4e49..c0153b239d 100644
--- a/android/src/main/res/layout/preferences.xml
+++ b/android/src/main/res/layout/preferences.xml
@@ -45,13 +45,13 @@
<net.mullvad.mullvadvpn.ui.widget.ToggleCell android:id="@+id/auto_connect"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="@dimen/vertical_space"
mullvad:text="@string/auto_connect"
mullvad:footer="@string/auto_connect_footer" />
<net.mullvad.mullvadvpn.ui.widget.ToggleCell android:id="@+id/allow_lan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="@dimen/vertical_space"
mullvad:text="@string/local_network_sharing"
mullvad:footer="@string/allow_lan_footer" />
</LinearLayout>
diff --git a/android/src/main/res/layout/problem_report.xml b/android/src/main/res/layout/problem_report.xml
index c1a2d48517..8c8dba11dd 100644
--- a/android/src/main/res/layout/problem_report.xml
+++ b/android/src/main/res/layout/problem_report.xml
@@ -52,7 +52,7 @@
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
- android:layout_marginBottom="24dp"
+ android:layout_marginBottom="@dimen/vertical_space"
android:layout_marginHorizontal="@dimen/side_margin"
android:textColor="@color/white80"
android:textSize="@dimen/text_small"
diff --git a/android/src/main/res/layout/select_location_header.xml b/android/src/main/res/layout/select_location_header.xml
index 46fd46ff38..394196ef87 100644
--- a/android/src/main/res/layout/select_location_header.xml
+++ b/android/src/main/res/layout/select_location_header.xml
@@ -15,7 +15,7 @@
android:layout_height="wrap_content"
android:layout_weight="0"
android:layout_marginHorizontal="@dimen/side_margin"
- android:layout_marginBottom="24dp"
+ android:layout_marginBottom="@dimen/vertical_space"
android:textColor="@color/white60"
android:textSize="@dimen/text_small"
android:text="@string/select_location_description" />
diff --git a/android/src/main/res/layout/settings.xml b/android/src/main/res/layout/settings.xml
index 19b463bcf1..4b9109093a 100644
--- a/android/src/main/res/layout/settings.xml
+++ b/android/src/main/res/layout/settings.xml
@@ -46,7 +46,7 @@
<net.mullvad.mullvadvpn.ui.widget.AccountCell android:id="@+id/account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="@dimen/vertical_space"
mullvad:text="@string/settings_account" />
<net.mullvad.mullvadvpn.ui.widget.NavigateCell android:id="@+id/preferences"
android:layout_width="match_parent"
@@ -61,17 +61,18 @@
<net.mullvad.mullvadvpn.ui.widget.AppVersionCell android:id="@+id/app_version"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="1dp"
+ android:layout_marginTop="@dimen/vertical_space"
mullvad:text="@string/app_version"
mullvad:footer="@string/update_available_footer" />
<net.mullvad.mullvadvpn.ui.widget.NavigateCell android:id="@+id/report_a_problem"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="@dimen/vertical_space"
mullvad:text="@string/report_a_problem" />
<Button android:id="@+id/quit_button"
android:layout_marginHorizontal="@dimen/side_margin"
- android:layout_marginVertical="24dp"
+ android:layout_marginTop="@dimen/vertical_space"
+ android:layout_marginBottom="24dp"
android:text="@string/quit"
style="@style/RedButton" />
</LinearLayout>
diff --git a/android/src/main/res/layout/split_tunnelling_header.xml b/android/src/main/res/layout/split_tunnelling_header.xml
index 7e58aa8a8c..359bf1f7e8 100644
--- a/android/src/main/res/layout/split_tunnelling_header.xml
+++ b/android/src/main/res/layout/split_tunnelling_header.xml
@@ -23,12 +23,12 @@
<net.mullvad.mullvadvpn.ui.widget.ToggleCell android:id="@+id/enabled"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="@dimen/vertical_space"
mullvad:text="@string/enabled" />
<LinearLayout android:id="@+id/exclude_applications"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="@dimen/vertical_space"
android:paddingHorizontal="16dp"
android:background="@drawable/cell_button_background"
android:visibility="gone"
@@ -47,7 +47,7 @@
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_gravity="center"
- android:layout_marginTop="24dp"
+ android:layout_marginTop="@dimen/vertical_space"
android:indeterminate="true"
android:indeterminateOnly="true"
android:indeterminateDuration="600"
diff --git a/android/src/main/res/layout/welcome.xml b/android/src/main/res/layout/welcome.xml
index 10b7eca4a7..4ae507bd2d 100644
--- a/android/src/main/res/layout/welcome.xml
+++ b/android/src/main/res/layout/welcome.xml
@@ -45,6 +45,7 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/side_margin"
android:layout_marginTop="11dp"
+ android:layout_marginBottom="@dimen/vertical_space"
android:textColor="@color/white"
android:textSize="@dimen/text_small" />
<Space android:layout_width="match_parent"
diff --git a/android/src/main/res/layout/wireguard_key.xml b/android/src/main/res/layout/wireguard_key.xml
index 714a3b4025..1d3065fece 100644
--- a/android/src/main/res/layout/wireguard_key.xml
+++ b/android/src/main/res/layout/wireguard_key.xml
@@ -40,7 +40,7 @@
android:layout_weight="0"
android:layout_marginLeft="@dimen/side_margin"
android:layout_marginTop="4dp"
- android:layout_marginBottom="12dp"
+ android:layout_marginBottom="@dimen/half_vertical_space"
android:text="@string/wireguard_key"
style="@style/SettingsExpandedHeader" />
<net.mullvad.mullvadvpn.ui.widget.CopyableInformationView android:id="@+id/public_key"
@@ -48,7 +48,7 @@
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingHorizontal="@dimen/side_margin"
- android:paddingVertical="12dp"
+ android:paddingVertical="@dimen/half_vertical_space"
mullvad:clipboardLabel="@string/wireguard_public_key"
mullvad:copiedToast="@string/copied_wireguard_public_key"
mullvad:description="@string/public_key"
@@ -59,13 +59,13 @@
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingHorizontal="@dimen/side_margin"
- android:paddingVertical="12dp"
+ android:paddingVertical="@dimen/half_vertical_space"
mullvad:description="@string/wireguard_key_generated"
mullvad:whenMissing="showSpinner" />
<FrameLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingHorizontal="@dimen/side_margin"
- android:paddingVertical="12dp">
+ android:paddingVertical="@dimen/half_vertical_space">
<TextView android:id="@+id/wireguard_key_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/android/src/main/res/values/dimensions.xml b/android/src/main/res/values/dimensions.xml
index 57957c94e6..3b89743521 100644
--- a/android/src/main/res/values/dimensions.xml
+++ b/android/src/main/res/values/dimensions.xml
@@ -30,4 +30,6 @@
<dimen name="text_big">24sp</dimen>
<dimen name="text_huge">30sp</dimen>
<dimen name="side_margin">22dp</dimen>
+ <dimen name="vertical_space">24dp</dimen>
+ <dimen name="half_vertical_space">12dp</dimen>
</resources>