diff options
| author | Albin <albin@mullvad.net> | 2023-07-21 16:39:39 +0200 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2023-07-21 16:39:39 +0200 |
| commit | 7087c16fa8ff4b6256498d4dc71fc34156fd6d15 (patch) | |
| tree | 36d26413f7efd8b7f3f5ce3700a1b864b9ed4e36 /android/app/src | |
| parent | aa808580fc11b04c8f8a647aad31d87a239fd02f (diff) | |
| parent | a40408f5a0b7d625b6f42f8342ce365ec1c371f5 (diff) | |
| download | mullvadvpn-7087c16fa8ff4b6256498d4dc71fc34156fd6d15.tar.xz mullvadvpn-7087c16fa8ff4b6256498d4dc71fc34156fd6d15.zip | |
Merge branch 'fix-baselined-lint-issues-droid-66'
Diffstat (limited to 'android/app/src')
18 files changed, 29 insertions, 157 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/BackButton.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/BackButton.kt index 2bc4579c11..7cb3626084 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/BackButton.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/BackButton.kt @@ -45,7 +45,7 @@ class BackButton : LinearLayout { init { setFocusable(true) isClickable = true - gravity = Gravity.CENTER_VERTICAL or Gravity.LEFT + gravity = Gravity.CENTER_VERTICAL or Gravity.START orientation = HORIZONTAL resources.getDimensionPixelSize(R.dimen.settings_back_button_padding).let { padding -> diff --git a/android/app/src/main/res/anim/fade_in.xml b/android/app/src/main/res/anim/fade_in.xml deleted file mode 100644 index d9b78f9197..0000000000 --- a/android/app/src/main/res/anim/fade_in.xml +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<set xmlns:android="http://schemas.android.com/apk/res/android"> - <alpha android:fromAlpha="0.0" - android:toAlpha="1.0" - android:duration="@integer/transition_animation_duration" /> -</set> diff --git a/android/app/src/main/res/drawable/transparent_red_button_background.xml b/android/app/src/main/res/drawable/transparent_red_button_background.xml deleted file mode 100644 index 84a3a77c38..0000000000 --- a/android/app/src/main/res/drawable/transparent_red_button_background.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_pressed="false" - android:state_focused="false"> - <shape android:shape="rectangle"> - <corners android:radius="4dp" /> - <solid android:color="@color/red60" /> - </shape> - </item> - <item android:state_pressed="false" - android:state_focused="true"> - <shape android:shape="rectangle"> - <corners android:radius="4dp" /> - <solid android:color="@color/red95" /> - </shape> - </item> - <item android:state_pressed="true"> - <shape android:shape="rectangle"> - <corners android:radius="4dp" /> - <solid android:color="@color/red80" /> - </shape> - </item> -</selector> diff --git a/android/app/src/main/res/layout/account.xml b/android/app/src/main/res/layout/account.xml index 86af11c504..8d896b2223 100644 --- a/android/app/src/main/res/layout/account.xml +++ b/android/app/src/main/res/layout/account.xml @@ -3,7 +3,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/darkBlue" - android:gravity="left"> + android:gravity="start"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/android/app/src/main/res/layout/account_history_entry.xml b/android/app/src/main/res/layout/account_history_entry.xml index c31782c0bd..19ae478349 100644 --- a/android/app/src/main/res/layout/account_history_entry.xml +++ b/android/app/src/main/res/layout/account_history_entry.xml @@ -15,7 +15,7 @@ <ImageButton android:id="@+id/remove" android:layout_width="@dimen/account_history_entry_height" android:layout_height="@dimen/account_history_entry_height" - android:layout_gravity="right" + android:layout_gravity="end" android:nextFocusLeft="@id/remove" android:background="?android:attr/selectableItemBackground" android:src="@drawable/account_history_remove" /> diff --git a/android/app/src/main/res/layout/account_login_border.xml b/android/app/src/main/res/layout/account_login_border.xml index 73f17980e3..dab613ca57 100644 --- a/android/app/src/main/res/layout/account_login_border.xml +++ b/android/app/src/main/res/layout/account_login_border.xml @@ -4,56 +4,56 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" - android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:src="@drawable/account_login_corner" /> <ImageView android:id="@+id/top_right_corner" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" - android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:rotation="90" android:src="@drawable/account_login_corner" /> <ImageView android:id="@+id/bottom_right_corner" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:rotation="180" android:src="@drawable/account_login_corner" /> <ImageView android:id="@+id/bottom_left_corner" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:rotation="270" android:src="@drawable/account_login_corner" /> <!-- sides --> <ImageView android:id="@+id/left_border" android:layout_width="@dimen/account_login_border_width" android:layout_height="wrap_content" - android:layout_alignParentLeft="true" + android:layout_alignParentStart="true" android:layout_below="@id/top_left_corner" android:layout_above="@id/bottom_left_corner" android:src="@drawable/account_login_border" /> <ImageView android:id="@+id/right_border" android:layout_width="@dimen/account_login_border_width" android:layout_height="wrap_content" - android:layout_alignParentRight="true" + android:layout_alignParentEnd="true" android:layout_below="@id/top_right_corner" android:layout_above="@id/bottom_right_corner" android:src="@drawable/account_login_border" /> <ImageView android:id="@+id/top_border" android:layout_width="wrap_content" android:layout_height="@dimen/account_login_border_width" - android:layout_toLeftOf="@id/top_right_corner" - android:layout_toRightOf="@id/top_left_corner" + android:layout_toStartOf="@id/top_right_corner" + android:layout_toEndOf="@id/top_left_corner" android:layout_alignParentTop="true" android:src="@drawable/account_login_border" /> <ImageView android:id="@+id/bottom_border" android:layout_width="wrap_content" android:layout_height="@dimen/account_login_border_width" - android:layout_toLeftOf="@id/bottom_right_corner" - android:layout_toRightOf="@id/bottom_left_corner" + android:layout_toStartOf="@id/bottom_right_corner" + android:layout_toEndOf="@id/bottom_left_corner" android:layout_alignParentBottom="true" android:src="@drawable/account_login_border" /> </merge> diff --git a/android/app/src/main/res/layout/button.xml b/android/app/src/main/res/layout/button.xml index 51d273af97..5db4501a46 100644 --- a/android/app/src/main/res/layout/button.xml +++ b/android/app/src/main/res/layout/button.xml @@ -7,7 +7,7 @@ android:layout_width="20dp" android:layout_height="20dp" android:layout_marginHorizontal="9dp" - android:layout_gravity="right|center_vertical" + android:layout_gravity="end|center_vertical" android:indeterminate="true" android:indeterminateOnly="true" android:indeterminateDuration="600" @@ -17,7 +17,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginHorizontal="9dp" - android:layout_gravity="right|center_vertical" + android:layout_gravity="end|center_vertical" android:src="@android:color/transparent" android:visibility="gone" /> </merge> diff --git a/android/app/src/main/res/layout/confirm_no_email.xml b/android/app/src/main/res/layout/confirm_no_email.xml index ff538ff28b..bd6be5f4a4 100644 --- a/android/app/src/main/res/layout/confirm_no_email.xml +++ b/android/app/src/main/res/layout/confirm_no_email.xml @@ -7,7 +7,7 @@ android:padding="30dp" android:background="@drawable/dialog_background" android:orientation="vertical" - android:gravity="left"> + android:gravity="start"> <ImageView android:layout_width="44dp" android:layout_height="44dp" android:layout_marginTop="8dp" diff --git a/android/app/src/main/res/layout/missing_service.xml b/android/app/src/main/res/layout/missing_service.xml deleted file mode 100644 index 9e3f21fde7..0000000000 --- a/android/app/src/main/res/layout/missing_service.xml +++ /dev/null @@ -1,3 +0,0 @@ -<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent"></FrameLayout> diff --git a/android/app/src/main/res/layout/notification_banner.xml b/android/app/src/main/res/layout/notification_banner.xml index 3fb5ef4d10..fda78b3ef8 100644 --- a/android/app/src/main/res/layout/notification_banner.xml +++ b/android/app/src/main/res/layout/notification_banner.xml @@ -2,15 +2,15 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingVertical="8dp" - android:paddingLeft="16dp" - android:paddingRight="12dp" + android:paddingStart="16dp" + android:paddingEnd="12dp" android:focusable="true" android:background="?android:attr/selectableItemBackground"> <RelativeLayout android:id="@+id/notification_status_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" - android:layout_alignParentLeft="true" + android:layout_alignParentEnd="true" android:layout_alignBottom="@id/notification_title"> <ImageView android:id="@+id/notification_status" android:layout_width="wrap_content" @@ -22,9 +22,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" - android:layout_toLeftOf="@id/notification_icon" - android:layout_toRightOf="@id/notification_status_container" - android:layout_marginLeft="7dp" + android:layout_toStartOf="@id/notification_icon" + android:layout_toEndOf="@id/notification_status_container" + android:layout_marginStart="7dp" android:textSize="@dimen/text_small" android:textStyle="bold" android:text="@string/blocking_internet" @@ -33,8 +33,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignWithParentIfMissing="true" - android:layout_toLeftOf="@id/notification_icon" - android:layout_alignLeft="@id/notification_title" + android:layout_toStartOf="@id/notification_icon" + android:layout_alignStart="@id/notification_title" android:layout_below="@id/notification_title" android:textSize="@dimen/text_small" android:textColor="@color/white60" @@ -43,7 +43,7 @@ <ImageView android:id="@+id/notification_icon" android:layout_width="20dp" android:layout_height="20dp" - android:layout_alignParentRight="true" + android:layout_alignParentStart="true" android:layout_centerVertical="true" android:alpha="0.6" android:padding="4dp" diff --git a/android/app/src/main/res/layout/problem_report.xml b/android/app/src/main/res/layout/problem_report.xml index 614003054a..5832b1a893 100644 --- a/android/app/src/main/res/layout/problem_report.xml +++ b/android/app/src/main/res/layout/problem_report.xml @@ -3,7 +3,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/darkBlue" - android:gravity="left"> + android:gravity="start"> <TextView android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/android/app/src/main/res/layout/redeem_voucher.xml b/android/app/src/main/res/layout/redeem_voucher.xml index c3e081196e..3f6d91d183 100644 --- a/android/app/src/main/res/layout/redeem_voucher.xml +++ b/android/app/src/main/res/layout/redeem_voucher.xml @@ -8,7 +8,7 @@ android:padding="30dp" android:background="@drawable/dialog_background" android:orientation="vertical" - android:gravity="left"> + android:gravity="start"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="0" diff --git a/android/app/src/main/res/layout/settings_back_button.xml b/android/app/src/main/res/layout/settings_back_button.xml index fc750132ac..442437fca8 100644 --- a/android/app/src/main/res/layout/settings_back_button.xml +++ b/android/app/src/main/res/layout/settings_back_button.xml @@ -1,7 +1,7 @@ <merge xmlns:android="http://schemas.android.com/apk/res/android"> <ImageView android:layout_width="24dp" android:layout_height="24dp" - android:layout_marginRight="8dp" + android:layout_marginEnd="8dp" android:src="@drawable/icon_back" /> <TextView android:id="@+id/label" android:layout_width="wrap_content" diff --git a/android/app/src/main/res/layout/split_tunneling.xml b/android/app/src/main/res/layout/split_tunneling.xml deleted file mode 100644 index 33a6419400..0000000000 --- a/android/app/src/main/res/layout/split_tunneling.xml +++ /dev/null @@ -1,34 +0,0 @@ -<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" - android:gravity="left"> - <TextView android:id="@+id/title" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="@string/split_tunneling" - style="@style/SettingsCollapsedHeader" /> - <LinearLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> - <FrameLayout android:layout_width="match_parent" - android:layout_height="wrap_content"> - <net.mullvad.mullvadvpn.ui.widget.BackButton android:id="@+id/back" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - mullvad:text="@string/settings_vpn" /> - <TextView android:id="@+id/collapsed_title" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginHorizontal="4dp" - android:layout_gravity="center" - android:text="@string/split_tunneling" - style="@style/SettingsCollapsedHeader" /> - </FrameLayout> - <net.mullvad.mullvadvpn.ui.widget.CustomRecyclerView android:id="@+id/app_list" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:scrollbars="vertical" /> - </LinearLayout> -</FrameLayout> diff --git a/android/app/src/main/res/layout/split_tunneling_header.xml b/android/app/src/main/res/layout/split_tunneling_header.xml deleted file mode 100644 index 2f8bc681ce..0000000000 --- a/android/app/src/main/res/layout/split_tunneling_header.xml +++ /dev/null @@ -1,58 +0,0 @@ -<LinearLayout 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="wrap_content" - android:orientation="vertical" - android:gravity="left"> - <TextView android:id="@+id/expanded_title" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="0" - android:layout_marginLeft="@dimen/side_margin" - android:layout_marginTop="2dp" - android:layout_marginBottom="12dp" - android:lines="1" - android:text="@string/split_tunneling" - style="@style/SettingsExpandedHeader" /> - <TextView android:layout_width="match_parent" - android:layout_height="wrap_content" - android:paddingTop="8dp" - android:paddingHorizontal="@dimen/side_margin" - android:text="@string/split_tunneling_description" - android:textColor="@color/white" - android:textSize="@dimen/text_small" /> - <net.mullvad.mullvadvpn.ui.widget.ToggleCell android:id="@+id/enabled" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/vertical_space" - mullvad:text="@string/enable" /> - <LinearLayout android:id="@+id/exclude_applications" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginTop="@dimen/vertical_space" - android:paddingLeft="@dimen/cell_left_padding" - android:paddingRight="@dimen/cell_right_padding" - android:background="@drawable/cell_button_background" - android:visibility="gone" - android:gravity="center"> - <TextView android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_weight="1" - android:paddingRight="@dimen/cell_inner_spacing" - android:paddingVertical="@dimen/cell_label_vertical_padding" - android:textColor="@color/white" - android:textSize="@dimen/text_medium" - android:textStyle="bold" - android:text="@string/exclude_applications" /> - </LinearLayout> - <ProgressBar android:id="@+id/loading_spinner" - android:layout_width="60dp" - android:layout_height="60dp" - android:layout_gravity="center" - android:layout_marginTop="@dimen/vertical_space" - android:indeterminate="true" - android:indeterminateOnly="true" - android:indeterminateDuration="600" - android:indeterminateDrawable="@drawable/icon_spinner" - android:visibility="gone" /> -</LinearLayout> diff --git a/android/app/src/main/res/layout/view_logs.xml b/android/app/src/main/res/layout/view_logs.xml index 3bf9e615fc..2011c8b5c9 100644 --- a/android/app/src/main/res/layout/view_logs.xml +++ b/android/app/src/main/res/layout/view_logs.xml @@ -3,7 +3,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/darkBlue" - android:gravity="left" + android:gravity="start" android:orientation="vertical"> <net.mullvad.mullvadvpn.ui.widget.BackButton android:id="@+id/back" android:layout_width="wrap_content" diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml index 77a20b7922..1bcfd3d010 100644 --- a/android/app/src/main/res/values/colors.xml +++ b/android/app/src/main/res/values/colors.xml @@ -18,10 +18,7 @@ <color name="red95">#F2E34039</color> <color name="red80">#CCE34039</color> <color name="red60">#99E34039</color> - <color name="red45">#72E34039</color> - <color name="red40">#66E34039</color> <color name="yellow">#FFD323</color> - <color name="textInputBorder">#234161</color> <color name="icon_background">@color/darkBlue</color> <!-- Switch Colors --> <color name="switch_thumb_fill_checked">@color/green</color> diff --git a/android/app/src/main/res/values/strings_non_translatable.xml b/android/app/src/main/res/values/strings_non_translatable.xml index 7c8b868059..1e11bda6db 100644 --- a/android/app/src/main/res/values/strings_non_translatable.xml +++ b/android/app/src/main/res/values/strings_non_translatable.xml @@ -3,7 +3,6 @@ <string name="login_hint" translatable="false">0000 0000 0000 0000</string> <string name="voucher_hint" translatable="false">XXXX-XXXX-XXXX-XXXX</string> <string name="account_url" translatable="false">https://mullvad.net/account</string> - <string name="wg_key_url" translatable="false">https://mullvad.net/account/ports</string> <string name="download_url" translatable="false">https://mullvad.net/download</string> <string name="faqs_and_guides_url" translatable="false">https://mullvad.net/help/tag/mullvad-app/</string> <string name="privacy_policy_url" translatable="false">https://mullvad.net/help/privacy-policy/</string> |
