summaryrefslogtreecommitdiffhomepage
path: root/android/src/main
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-07-21 13:49:19 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-07-23 12:59:41 +0000
commit8cd1cd7ea4b610b3f0e1be4f4a8fee7b0fbf66aa (patch)
tree0fae59513968d984267e3a10dacd0c7a85f0aede /android/src/main
parent0be45ecbdcc960068d345574d661682426eefc2b (diff)
downloadmullvadvpn-8cd1cd7ea4b610b3f0e1be4f4a8fee7b0fbf66aa.tar.xz
mullvadvpn-8cd1cd7ea4b610b3f0e1be4f4a8fee7b0fbf66aa.zip
Create styles for settings screen headers
Diffstat (limited to 'android/src/main')
-rw-r--r--android/src/main/res/layout/account.xml18
-rw-r--r--android/src/main/res/layout/advanced.xml18
-rw-r--r--android/src/main/res/layout/preferences.xml18
-rw-r--r--android/src/main/res/layout/problem_report.xml18
-rw-r--r--android/src/main/res/layout/select_location.xml12
-rw-r--r--android/src/main/res/layout/select_location_header.xml6
-rw-r--r--android/src/main/res/layout/settings.xml18
-rw-r--r--android/src/main/res/layout/split_tunnelling.xml12
-rw-r--r--android/src/main/res/layout/split_tunnelling_header.xml4
-rw-r--r--android/src/main/res/layout/wireguard_key.xml16
-rw-r--r--android/src/main/res/values/styles.xml12
11 files changed, 58 insertions, 94 deletions
diff --git a/android/src/main/res/layout/account.xml b/android/src/main/res/layout/account.xml
index d827e77acd..4317ec5826 100644
--- a/android/src/main/res/layout/account.xml
+++ b/android/src/main/res/layout/account.xml
@@ -8,10 +8,8 @@
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/settings_account" />
+ android:text="@string/settings_account"
+ style="@style/SettingsCollapsedHeader" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -41,10 +39,8 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:layout_gravity="center"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/settings_account" />
+ android:text="@string/settings_account"
+ style="@style/SettingsCollapsedHeader" />
</FrameLayout>
<net.mullvad.mullvadvpn.ui.widget.ListenableScrollView android:id="@+id/scroll_area"
android:layout_width="match_parent"
@@ -60,10 +56,8 @@
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:layout_marginHorizontal="24dp"
- android:textColor="@color/white"
- android:textSize="32sp"
- android:textStyle="bold"
- android:text="@string/settings_account" />
+ android:text="@string/settings_account"
+ style="@style/SettingsExpandedHeader" />
<net.mullvad.mullvadvpn.ui.widget.CopyableInformationView android:id="@+id/account_number"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/android/src/main/res/layout/advanced.xml b/android/src/main/res/layout/advanced.xml
index 3d24a40d03..a91af61354 100644
--- a/android/src/main/res/layout/advanced.xml
+++ b/android/src/main/res/layout/advanced.xml
@@ -8,10 +8,8 @@
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/settings_advanced" />
+ android:text="@string/settings_advanced"
+ style="@style/SettingsCollapsedHeader" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -41,10 +39,8 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:layout_gravity="center"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/settings_advanced" />
+ android:text="@string/settings_advanced"
+ style="@style/SettingsCollapsedHeader" />
</FrameLayout>
<net.mullvad.mullvadvpn.ui.widget.ListenableScrollView android:id="@+id/scroll_area"
android:layout_width="match_parent"
@@ -59,10 +55,8 @@
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginLeft="24dp"
- android:textColor="@color/white"
- android:textSize="32sp"
- android:textStyle="bold"
- android:text="@string/settings_advanced" />
+ android:text="@string/settings_advanced"
+ style="@style/SettingsExpandedHeader" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
diff --git a/android/src/main/res/layout/preferences.xml b/android/src/main/res/layout/preferences.xml
index ad51a62277..c36ea6a0a7 100644
--- a/android/src/main/res/layout/preferences.xml
+++ b/android/src/main/res/layout/preferences.xml
@@ -7,10 +7,8 @@
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/settings_preferences" />
+ android:text="@string/settings_preferences"
+ style="@style/SettingsCollapsedHeader" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -40,10 +38,8 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:layout_gravity="center"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/settings_preferences" />
+ android:text="@string/settings_preferences"
+ style="@style/SettingsCollapsedHeader" />
</FrameLayout>
<net.mullvad.mullvadvpn.ui.widget.ListenableScrollView android:id="@+id/scroll_area"
android:layout_width="match_parent"
@@ -58,10 +54,8 @@
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginLeft="24dp"
- android:textColor="@color/white"
- android:textSize="32sp"
- android:textStyle="bold"
- android:text="@string/settings_preferences" />
+ android:text="@string/settings_preferences"
+ style="@style/SettingsExpandedHeader" />
<LinearLayout android:id="@+id/auto_connect"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/android/src/main/res/layout/problem_report.xml b/android/src/main/res/layout/problem_report.xml
index 38ac852949..72a10358d7 100644
--- a/android/src/main/res/layout/problem_report.xml
+++ b/android/src/main/res/layout/problem_report.xml
@@ -7,10 +7,8 @@
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/report_a_problem" />
+ android:text="@string/report_a_problem"
+ style="@style/SettingsCollapsedHeader" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -40,10 +38,8 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:layout_gravity="center"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/report_a_problem" />
+ android:text="@string/report_a_problem"
+ style="@style/SettingsCollapsedHeader" />
</FrameLayout>
<net.mullvad.mullvadvpn.ui.widget.ListenableScrollView android:id="@+id/scroll_area"
android:layout_width="match_parent"
@@ -59,10 +55,8 @@
android:layout_marginTop="4dp"
android:layout_marginBottom="8dp"
android:layout_marginHorizontal="24dp"
- android:textColor="@color/white"
- android:textSize="32sp"
- android:textStyle="bold"
- android:text="@string/report_a_problem" />
+ android:text="@string/report_a_problem"
+ style="@style/SettingsExpandedHeader" />
<ViewSwitcher android:id="@+id/body_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
diff --git a/android/src/main/res/layout/select_location.xml b/android/src/main/res/layout/select_location.xml
index cf3e905876..1bd76268db 100644
--- a/android/src/main/res/layout/select_location.xml
+++ b/android/src/main/res/layout/select_location.xml
@@ -7,10 +7,8 @@
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/select_location" />
+ android:text="@string/select_location"
+ style="@style/SettingsCollapsedHeader" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -27,10 +25,8 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:layout_gravity="center"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/select_location" />
+ android:text="@string/select_location"
+ style="@style/SettingsCollapsedHeader" />
</FrameLayout>
<net.mullvad.mullvadvpn.ui.widget.CustomRecyclerView android:id="@+id/relay_list"
android:layout_width="match_parent"
diff --git a/android/src/main/res/layout/select_location_header.xml b/android/src/main/res/layout/select_location_header.xml
index 85b160ad9f..9cc9f53860 100644
--- a/android/src/main/res/layout/select_location_header.xml
+++ b/android/src/main/res/layout/select_location_header.xml
@@ -9,10 +9,8 @@
android:layout_weight="0"
android:layout_marginVertical="4dp"
android:layout_marginHorizontal="24dp"
- android:textColor="@color/white"
- android:textSize="32sp"
- android:textStyle="bold"
- android:text="@string/select_location" />
+ android:text="@string/select_location"
+ style="@style/SettingsExpandedHeader" />
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
diff --git a/android/src/main/res/layout/settings.xml b/android/src/main/res/layout/settings.xml
index 13488a2b43..da849c4144 100644
--- a/android/src/main/res/layout/settings.xml
+++ b/android/src/main/res/layout/settings.xml
@@ -7,10 +7,8 @@
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/settings" />
+ android:text="@string/settings"
+ style="@style/SettingsCollapsedHeader" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -27,10 +25,8 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:layout_gravity="center"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/settings" />
+ android:text="@string/settings"
+ style="@style/SettingsCollapsedHeader" />
</FrameLayout>
<net.mullvad.mullvadvpn.ui.widget.ListenableScrollView android:id="@+id/scroll_area"
android:layout_width="match_parent"
@@ -44,10 +40,8 @@
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginLeft="24dp"
- android:textColor="@color/white"
- android:textSize="32sp"
- android:textStyle="bold"
- android:text="@string/settings" />
+ android:text="@string/settings"
+ style="@style/SettingsExpandedHeader" />
<LinearLayout android:id="@+id/account"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/android/src/main/res/layout/split_tunnelling.xml b/android/src/main/res/layout/split_tunnelling.xml
index e6284884c5..76a7cb20a0 100644
--- a/android/src/main/res/layout/split_tunnelling.xml
+++ b/android/src/main/res/layout/split_tunnelling.xml
@@ -8,10 +8,8 @@
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/split_tunnelling" />
+ android:text="@string/split_tunnelling"
+ style="@style/SettingsCollapsedHeader" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -42,10 +40,8 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:layout_gravity="center"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/split_tunnelling" />
+ android:text="@string/split_tunnelling"
+ style="@style/SettingsCollapsedHeader" />
</FrameLayout>
<net.mullvad.mullvadvpn.ui.widget.CustomRecyclerView android:id="@+id/app_list"
android:layout_width="match_parent"
diff --git a/android/src/main/res/layout/split_tunnelling_header.xml b/android/src/main/res/layout/split_tunnelling_header.xml
index 4db5c6fc80..3fa595f55f 100644
--- a/android/src/main/res/layout/split_tunnelling_header.xml
+++ b/android/src/main/res/layout/split_tunnelling_header.xml
@@ -11,9 +11,7 @@
android:layout_marginTop="4dp"
android:layout_marginBottom="12dp"
android:text="@string/split_tunnelling"
- android:textColor="@color/white"
- android:textSize="32sp"
- android:textStyle="bold" />
+ style="@style/SettingsExpandedHeader" />
<TextView android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
diff --git a/android/src/main/res/layout/wireguard_key.xml b/android/src/main/res/layout/wireguard_key.xml
index 0abbdb526e..f363d42621 100644
--- a/android/src/main/res/layout/wireguard_key.xml
+++ b/android/src/main/res/layout/wireguard_key.xml
@@ -8,10 +8,8 @@
<TextView android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/wireguard_key" />
+ android:text="@string/wireguard_key"
+ style="@style/SettingsCollapsedHeader" />
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@@ -42,10 +40,8 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="4dp"
android:layout_gravity="center"
- android:textColor="@color/white"
- android:textSize="16sp"
- android:textStyle="bold"
- android:text="@string/wireguard_key" />
+ android:text="@string/wireguard_key"
+ style="@style/SettingsCollapsedHeader" />
</FrameLayout>
<net.mullvad.mullvadvpn.ui.widget.ListenableScrollView android:id="@+id/scroll_area"
android:layout_width="match_parent"
@@ -62,9 +58,7 @@
android:layout_marginTop="4dp"
android:layout_marginBottom="12dp"
android:text="@string/wireguard_key"
- android:textColor="@color/white"
- android:textSize="32sp"
- android:textStyle="bold" />
+ style="@style/SettingsExpandedHeader" />
<net.mullvad.mullvadvpn.ui.widget.CopyableInformationView android:id="@+id/public_key"
android:layout_width="match_parent"
android:layout_height="wrap_content"
diff --git a/android/src/main/res/values/styles.xml b/android/src/main/res/values/styles.xml
index 198e0471a6..c1ac78d446 100644
--- a/android/src/main/res/values/styles.xml
+++ b/android/src/main/res/values/styles.xml
@@ -40,4 +40,16 @@
parent="Button">
<item name="android:background">@drawable/white20_button_background</item>
</style>
+ <style name="SettingsHeader">
+ <item name="android:textColor">@color/white</item>
+ <item name="android:textStyle">bold</item>
+ </style>
+ <style name="SettingsExpandedHeader"
+ parent="SettingsHeader">
+ <item name="android:textSize">32sp</item>
+ </style>
+ <style name="SettingsCollapsedHeader"
+ parent="SettingsHeader">
+ <item name="android:textSize">16sp</item>
+ </style>
</resources>