diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-07-21 15:33:19 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2020-07-23 13:38:09 +0000 |
| commit | 8223050fcca969f8d0db5926cc7e6216cb17cef8 (patch) | |
| tree | aad20f65ce521a4d183be0b843d5660ede84790a /android/src | |
| parent | 74b441131ed615877d56a62c67ce242e95502bb1 (diff) | |
| download | mullvadvpn-8223050fcca969f8d0db5926cc7e6216cb17cef8.tar.xz mullvadvpn-8223050fcca969f8d0db5926cc7e6216cb17cef8.zip | |
Refactor to use `BackButton`
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/res/layout/account.xml | 23 | ||||
| -rw-r--r-- | android/src/main/res/layout/advanced.xml | 23 | ||||
| -rw-r--r-- | android/src/main/res/layout/preferences.xml | 24 | ||||
| -rw-r--r-- | android/src/main/res/layout/problem_report.xml | 24 | ||||
| -rw-r--r-- | android/src/main/res/layout/split_tunnelling.xml | 24 | ||||
| -rw-r--r-- | android/src/main/res/layout/wireguard_key.xml | 24 |
6 files changed, 26 insertions, 116 deletions
diff --git a/android/src/main/res/layout/account.xml b/android/src/main/res/layout/account.xml index 4317ec5826..86d4e31664 100644 --- a/android/src/main/res/layout/account.xml +++ b/android/src/main/res/layout/account.xml @@ -15,25 +15,10 @@ android:orientation="vertical"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> - <LinearLayout android:id="@+id/back" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:orientation="horizontal" - android:gravity="center_vertical | left" - android:clickable="true" - android:background="?android:attr/selectableItemBackground"> - <ImageView android:layout_width="24dp" - android:layout_height="24dp" - android:layout_marginRight="8dp" - android:src="@drawable/icon_back" /> - <TextView android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/white60" - android:textSize="13sp" - android:textStyle="bold" - android:text="@string/settings" /> - </LinearLayout> + <net.mullvad.mullvadvpn.ui.widget.BackButton android:id="@+id/back" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + mullvad:text="@string/settings" /> <TextView android:id="@+id/collapsed_title" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/android/src/main/res/layout/advanced.xml b/android/src/main/res/layout/advanced.xml index a91af61354..3aef5882b7 100644 --- a/android/src/main/res/layout/advanced.xml +++ b/android/src/main/res/layout/advanced.xml @@ -15,25 +15,10 @@ android:orientation="vertical"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> - <LinearLayout android:id="@+id/back" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:orientation="horizontal" - android:gravity="center_vertical | left" - android:clickable="true" - android:background="?android:attr/selectableItemBackground"> - <ImageView android:layout_width="24dp" - android:layout_height="24dp" - android:layout_marginRight="8dp" - android:src="@drawable/icon_back" /> - <TextView android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/white60" - android:textSize="13sp" - android:textStyle="bold" - android:text="@string/settings" /> - </LinearLayout> + <net.mullvad.mullvadvpn.ui.widget.BackButton android:id="@+id/back" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + mullvad:text="@string/settings" /> <TextView android:id="@+id/collapsed_title" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/android/src/main/res/layout/preferences.xml b/android/src/main/res/layout/preferences.xml index c36ea6a0a7..0f513be296 100644 --- a/android/src/main/res/layout/preferences.xml +++ b/android/src/main/res/layout/preferences.xml @@ -1,4 +1,5 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:mullvad="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/darkBlue" @@ -14,25 +15,10 @@ android:orientation="vertical"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> - <LinearLayout android:id="@+id/back" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:orientation="horizontal" - android:gravity="center_vertical | left" - android:clickable="true" - android:background="?android:attr/selectableItemBackground"> - <ImageView android:layout_width="24dp" - android:layout_height="24dp" - android:layout_marginRight="8dp" - android:src="@drawable/icon_back" /> - <TextView android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/white60" - android:textSize="13sp" - android:textStyle="bold" - android:text="@string/settings" /> - </LinearLayout> + <net.mullvad.mullvadvpn.ui.widget.BackButton android:id="@+id/back" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + mullvad:text="@string/settings" /> <TextView android:id="@+id/collapsed_title" android:layout_width="wrap_content" 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 72a10358d7..d0259a2bfc 100644 --- a/android/src/main/res/layout/problem_report.xml +++ b/android/src/main/res/layout/problem_report.xml @@ -1,4 +1,5 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:mullvad="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/darkBlue" @@ -14,25 +15,10 @@ android:orientation="vertical"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> - <LinearLayout android:id="@+id/back" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:padding="12dp" - android:orientation="horizontal" - android:gravity="center_vertical | left" - android:clickable="true" - android:background="?android:attr/selectableItemBackground"> - <ImageView android:layout_width="24dp" - android:layout_height="24dp" - android:layout_marginRight="8dp" - android:src="@drawable/icon_back" /> - <TextView android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/white60" - android:textSize="13sp" - android:textStyle="bold" - android:text="@string/settings" /> - </LinearLayout> + <net.mullvad.mullvadvpn.ui.widget.BackButton android:id="@+id/back" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + mullvad:text="@string/settings" /> <TextView android:id="@+id/collapsed_title" android:layout_width="wrap_content" 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 76a7cb20a0..aabc764c95 100644 --- a/android/src/main/res/layout/split_tunnelling.xml +++ b/android/src/main/res/layout/split_tunnelling.xml @@ -15,26 +15,10 @@ android:orientation="vertical"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> - <LinearLayout android:id="@+id/back" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="0" - android:padding="12dp" - android:orientation="horizontal" - android:gravity="center_vertical | left" - android:clickable="true" - android:background="?android:attr/selectableItemBackground"> - <ImageView android:layout_width="24dp" - android:layout_height="24dp" - android:layout_marginRight="8dp" - android:src="@drawable/icon_back" /> - <TextView android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/white60" - android:textSize="13sp" - android:textStyle="bold" - android:text="@string/settings_advanced" /> - </LinearLayout> + <net.mullvad.mullvadvpn.ui.widget.BackButton android:id="@+id/back" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + mullvad:text="@string/settings_advanced" /> <TextView android:id="@+id/collapsed_title" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/android/src/main/res/layout/wireguard_key.xml b/android/src/main/res/layout/wireguard_key.xml index f363d42621..24b3548240 100644 --- a/android/src/main/res/layout/wireguard_key.xml +++ b/android/src/main/res/layout/wireguard_key.xml @@ -15,26 +15,10 @@ android:orientation="vertical"> <FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content"> - <LinearLayout android:id="@+id/back" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="0" - android:padding="12dp" - android:orientation="horizontal" - android:gravity="center_vertical | left" - android:clickable="true" - android:background="?android:attr/selectableItemBackground"> - <ImageView android:layout_width="24dp" - android:layout_height="24dp" - android:layout_marginRight="8dp" - android:src="@drawable/icon_back" /> - <TextView android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:textColor="@color/white60" - android:textSize="13sp" - android:textStyle="bold" - android:text="@string/settings_advanced" /> - </LinearLayout> + <net.mullvad.mullvadvpn.ui.widget.BackButton android:id="@+id/back" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + mullvad:text="@string/settings_advanced" /> <TextView android:id="@+id/collapsed_title" android:layout_width="wrap_content" android:layout_height="wrap_content" |
