summaryrefslogtreecommitdiffhomepage
path: root/android
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2023-10-12 14:49:37 +0200
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2023-10-12 14:49:37 +0200
commit5f0f746b05f41e93306ec91c9389c07b2915ab6e (patch)
tree83703154d36ef3b7880a7fa1ec619ba32f570382 /android
parent30b81b081df1694229c9fd1995030ce1fab851b9 (diff)
parent28f395e045e8299e4a786b78bfc79e157f43d61f (diff)
downloadmullvadvpn-5f0f746b05f41e93306ec91c9389c07b2915ab6e.tar.xz
mullvadvpn-5f0f746b05f41e93306ec91c9389c07b2915ab6e.zip
Merge branch 'remove-unused-code-related-to-old-ui-and-remove-baseline-des-402'
Diffstat (limited to 'android')
-rw-r--r--android/app/lint-baseline.xml490
-rw-r--r--android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/RecyclerViewMatcher.kt52
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/DnsCell.kt7
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/InformationComposeCell.kt7
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DeviceRemovalDialog.kt16
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DnsDialog.kt53
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/PrivacyDisclaimerScreen.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/CustomTransformationMethod.kt50
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/NavigationBarPainter.kt10
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/StatusBarPainter.kt10
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/SystemPainter.kt7
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/AccountFragment.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/ConnectFragment.kt3
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/LoadingFragment.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/LoginFragment.kt3
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/PrivacyDisclaimerFragment.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/SelectLocationFragment.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/SettingsFragment.kt4
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/BackButton.kt75
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/Button.kt171
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/HeaderBar.kt73
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/ListenableScrollView.kt31
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/Debouncer.kt41
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/LinearInterpolation.kt46
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/ListenableScrollableView.kt8
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/SegmentedInputFormatter.kt147
-rw-r--r--android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/SegmentedTextFormatter.kt14
-rw-r--r--android/app/src/main/res/layout/button.xml23
-rw-r--r--android/app/src/main/res/layout/header_bar.xml46
-rw-r--r--android/app/src/main/res/layout/settings_back_button.xml12
-rw-r--r--android/lib/resource/lint-baseline.xml454
-rw-r--r--android/lib/resource/src/main/res/color/switch_thumb_fill_selector.xml7
-rw-r--r--android/lib/resource/src/main/res/drawable/account_history_entry_background.xml20
-rw-r--r--android/lib/resource/src/main/res/drawable/account_history_remove.xml8
-rw-r--r--android/lib/resource/src/main/res/drawable/account_history_remove_normal.xml38
-rw-r--r--android/lib/resource/src/main/res/drawable/account_input_background.xml14
-rw-r--r--android/lib/resource/src/main/res/drawable/account_login_border.xml5
-rw-r--r--android/lib/resource/src/main/res/drawable/account_login_border_error.xml5
-rw-r--r--android/lib/resource/src/main/res/drawable/account_login_border_focused.xml5
-rw-r--r--android/lib/resource/src/main/res/drawable/account_login_corner.xml9
-rw-r--r--android/lib/resource/src/main/res/drawable/account_login_corner_error.xml11
-rw-r--r--android/lib/resource/src/main/res/drawable/account_login_corner_focused.xml11
-rw-r--r--android/lib/resource/src/main/res/drawable/app_list_item_background.xml20
-rw-r--r--android/lib/resource/src/main/res/drawable/blue_button_background.xml23
-rw-r--r--android/lib/resource/src/main/res/drawable/cell_button_background.xml20
-rw-r--r--android/lib/resource/src/main/res/drawable/cell_switch_background.xml22
-rw-r--r--android/lib/resource/src/main/res/drawable/dialog_background.xml11
-rw-r--r--android/lib/resource/src/main/res/drawable/edit_text_background.xml25
-rw-r--r--android/lib/resource/src/main/res/drawable/green_button_background.xml23
-rw-r--r--android/lib/resource/src/main/res/drawable/icon_notification_error.xml7
-rw-r--r--android/lib/resource/src/main/res/drawable/icon_notification_warning.xml7
-rw-r--r--android/lib/resource/src/main/res/drawable/input_text_background.xml6
-rw-r--r--android/lib/resource/src/main/res/drawable/login_button_arrow.xml8
-rw-r--r--android/lib/resource/src/main/res/drawable/login_button_background.xml14
-rw-r--r--android/lib/resource/src/main/res/drawable/red_button_background.xml23
-rw-r--r--android/lib/resource/src/main/res/drawable/switch_thumb.xml16
-rw-r--r--android/lib/resource/src/main/res/drawable/switch_track.xml17
-rw-r--r--android/lib/resource/src/main/res/drawable/text_input_cursor.xml6
-rw-r--r--android/lib/resource/src/main/res/values/attrs.xml40
-rw-r--r--android/lib/resource/src/main/res/values/colors.xml24
-rw-r--r--android/lib/resource/src/main/res/values/dimensions.xml47
-rw-r--r--android/lib/resource/src/main/res/values/styles.xml85
62 files changed, 38 insertions, 2412 deletions
diff --git a/android/app/lint-baseline.xml b/android/app/lint-baseline.xml
index 8d45af3272..9b9d02fcc8 100644
--- a/android/app/lint-baseline.xml
+++ b/android/app/lint-baseline.xml
@@ -1,16 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.0.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.2)" variant="all" version="8.0.2">
- <issue
- id="MissingSuperCall"
- message="Overriding method should call `super.onDismiss`"
- errorLine1=" override fun onDismiss(dialogInterface: DialogInterface) {"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/ConfirmNoEmailDialogFragment.kt"
- line="61"
- column="18"/>
- </issue>
<issue
id="MissingSuperCall"
@@ -46,61 +36,6 @@
</issue>
<issue
- id="ResourceAsColor"
- message="Should pass resolved color instead of resource id here: `getResources().getColor(android.R.color.transparent)`"
- errorLine1=" dialog.window?.setBackgroundDrawable(ColorDrawable(android.R.color.transparent))"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/ConfirmNoEmailDialogFragment.kt"
- line="50"
- column="60"/>
- </issue>
-
- <issue
- id="ResourceAsColor"
- message="Should pass resolved color instead of resource id here: `getResources().getColor(android.R.color.transparent)`"
- errorLine1=" dialog.window?.setBackgroundDrawable(ColorDrawable(android.R.color.transparent))"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/RedeemVoucherDialogFragment.kt"
- line="108"
- column="60"/>
- </issue>
-
- <issue
- id="ScrollViewSize"
- message="This LinearLayout should use `android:layout_height=&quot;wrap_content&quot;`"
- errorLine1=" android:layout_height=&quot;match_parent&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/login.xml"
- line="9"
- column="19"/>
- </issue>
-
- <issue
- id="ScrollViewSize"
- message="This LinearLayout should use `android:layout_height=&quot;wrap_content&quot;`"
- errorLine1=" android:layout_height=&quot;match_parent&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/out_of_time.xml"
- line="14"
- column="23"/>
- </issue>
-
- <issue
- id="DefaultLocale"
- message="Implicitly using the default locale is a common source of bugs: Use `toUpperCase(Locale)` instead. For strings meant to be internal use `Locale.ROOT`, otherwise `Locale.getDefault()`."
- errorLine1=" input.replace(index, index + 1, character.toString().toUpperCase())"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/kotlin/net/mullvad/mullvadvpn/util/SegmentedInputFormatter.kt"
- line="117"
- column="74"/>
- </issue>
-
- <issue
id="InlinedApi"
message="Field requires API level 33 (current min is 26): `android.Manifest.permission#POST_NOTIFICATIONS`"
errorLine1=" requestNotificationPermissionLauncher.launch(Manifest.permission.POST_NOTIFICATIONS)"
@@ -134,17 +69,6 @@
</issue>
<issue
- id="Deprecated"
- message="`android:editable` is deprecated: Use `inputType` instead"
- errorLine1=" android:editable=&quot;false&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/view_logs.xml"
- line="31"
- column="19"/>
- </issue>
-
- <issue
id="UseCheckPermission"
message="The result of `checkPermission` is not used"
errorLine1=" mockedPackageManager.checkPermission(internet, packageName)"
@@ -178,28 +102,6 @@
</issue>
<issue
- id="NotifyDataSetChanged"
- message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort."
- errorLine1=" var accountHistory by observable&lt;String?>(null) { _, _, _ -> notifyDataSetChanged() }"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/AccountHistoryAdapter.kt"
- line="16"
- column="66"/>
- </issue>
-
- <issue
- id="NotifyDataSetChanged"
- message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort."
- errorLine1=" notifyDataSetChanged()"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/kotlin/net/mullvad/mullvadvpn/util/AdapterWithHeader.kt"
- line="17"
- column="17"/>
- </issue>
-
- <issue
id="MergeRootFrame"
message="This `&lt;FrameLayout>` can be replaced with a `&lt;merge>` tag"
errorLine1="&lt;FrameLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;"
@@ -210,396 +112,4 @@
column="1"/>
</issue>
- <issue
- id="InefficientWeight"
- message="Use a `layout_height` of `0dp` instead of `wrap_content` for better performance"
- errorLine1=" android:layout_height=&quot;wrap_content&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/confirm_no_email.xml"
- line="17"
- column="19"/>
- </issue>
-
- <issue
- id="InefficientWeight"
- message="Use a `layout_height` of `0dp` instead of `wrap_content` for better performance"
- errorLine1=" android:layout_height=&quot;wrap_content&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/problem_report.xml"
- line="38"
- column="27"/>
- </issue>
-
- <issue
- id="InefficientWeight"
- message="Use a `layout_height` of `0dp` instead of `wrap_content` for better performance"
- errorLine1=" android:layout_height=&quot;wrap_content&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/redeem_voucher.xml"
- line="13"
- column="19"/>
- </issue>
-
- <issue
- id="NestedWeights"
- message="Nested weights are bad for performance"
- errorLine1=" android:layout_weight=&quot;1&quot; />"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/login.xml"
- line="28"
- column="20"/>
- </issue>
-
- <issue
- id="Overdraw"
- message="Possible overdraw: Root element paints background `@color/darkBlue` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
- errorLine1=" android:background=&quot;@color/darkBlue&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/problem_report.xml"
- line="5"
- column="14"/>
- </issue>
-
- <issue
- id="Overdraw"
- message="Possible overdraw: Root element paints background `@color/darkBlue` with a theme that also paints a background (inferred theme is `@style/AppTheme`)"
- errorLine1=" android:background=&quot;@color/darkBlue&quot;"
- errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
- <location
- file="src/main/res/layout/view_logs.xml"
- line="5"
- column="15"/>
- </issue>
-
- <issue
- id="TextFields"
- message="This text field does not specify an `inputType`"
- errorLine1=" &lt;EditText android:id=&quot;@+id/login_input&quot;"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/res/layout/account_input.xml"
- line="2"
- column="6"/>
- </issue>
-
- <issue
- id="TextFields"
- message="This text field does not specify an `inputType`"
- errorLine1=" &lt;EditText android:id=&quot;@+id/user_message&quot;"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/res/layout/problem_report.xml"
- line="70"
- column="26"/>
- </issue>
-
- <issue
- id="TextFields"
- message="This text field does not specify an `inputType`"
- errorLine1=" &lt;EditText android:id=&quot;@+id/log_area&quot;"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/res/layout/view_logs.xml"
- line="28"
- column="10"/>
- </issue>
-
- <issue
- id="Autofill"
- message="Missing `autofillHints` attribute"
- errorLine1=" &lt;EditText android:id=&quot;@+id/login_input&quot;"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/res/layout/account_input.xml"
- line="2"
- column="6"/>
- </issue>
-
- <issue
- id="Autofill"
- message="Missing `autofillHints` attribute"
- errorLine1=" &lt;EditText android:id=&quot;@+id/user_email&quot;"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/res/layout/problem_report.xml"
- line="60"
- column="26"/>
- </issue>
-
- <issue
- id="Autofill"
- message="Missing `autofillHints` attribute"
- errorLine1=" &lt;EditText android:id=&quot;@+id/user_message&quot;"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/res/layout/problem_report.xml"
- line="70"
- column="26"/>
- </issue>
-
- <issue
- id="Autofill"
- message="Missing `autofillHints` attribute"
- errorLine1=" &lt;EditText android:id=&quot;@+id/voucher_code&quot;"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/res/layout/redeem_voucher.xml"
- line="19"
- column="10"/>
- </issue>
-
- <issue
- id="Autofill"
- message="Missing `autofillHints` attribute"
- errorLine1=" &lt;EditText android:id=&quot;@+id/log_area&quot;"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/res/layout/view_logs.xml"
- line="28"
- column="10"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageButton android:id=&quot;@+id/remove&quot;"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/res/layout/account_history_entry.xml"
- line="15"
- column="6"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageButton android:id=&quot;@+id/login_button&quot;"
- errorLine2=" ~~~~~~~~~~~">
- <location
- file="src/main/res/layout/account_input.xml"
- line="16"
- column="6"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/top_left_corner&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/account_login_border.xml"
- line="3"
- column="6"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/top_right_corner&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/account_login_border.xml"
- line="9"
- column="6"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/bottom_right_corner&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/account_login_border.xml"
- line="16"
- column="6"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/bottom_left_corner&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/account_login_border.xml"
- line="23"
- column="6"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/left_border&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/account_login_border.xml"
- line="31"
- column="6"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/right_border&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/account_login_border.xml"
- line="38"
- column="6"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/top_border&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/account_login_border.xml"
- line="45"
- column="6"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/bottom_border&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/account_login_border.xml"
- line="52"
- column="6"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/image&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/button.xml"
- line="16"
- column="6"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:layout_width=&quot;44dp&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/confirm_no_email.xml"
- line="11"
- column="10"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/appIcon&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/header_bar.xml"
- line="6"
- column="10"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/appLogo&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/header_bar.xml"
- line="14"
- column="10"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/logged_in_status&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/login.xml"
- line="42"
- column="18"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/login_fail_status&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/login.xml"
- line="48"
- column="18"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:layout_width=&quot;60dp&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/out_of_time.xml"
- line="16"
- column="14"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/sent_successfully_icon&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/problem_report.xml"
- line="110"
- column="30"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:id=&quot;@+id/failed_to_send_icon&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/problem_report.xml"
- line="116"
- column="30"/>
- </issue>
-
- <issue
- id="ContentDescription"
- message="Missing `contentDescription` attribute on image"
- errorLine1=" &lt;ImageView android:layout_width=&quot;24dp&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/layout/settings_back_button.xml"
- line="2"
- column="6"/>
- </issue>
-
- <issue
- id="LabelFor"
- message="Missing accessibility label: provide either a view with an `android:labelFor` that references this view or provide an `android:hint`"
- errorLine1=" &lt;EditText android:id=&quot;@+id/log_area&quot;"
- errorLine2=" ~~~~~~~~">
- <location
- file="src/main/res/layout/view_logs.xml"
- line="28"
- column="10"/>
- </issue>
-
- <issue
- id="RtlEnabled"
- message="The project references RTL attributes, but does not explicitly enable or disable RTL support with `android:supportsRtl` in the manifest">
- <location
- file="src/main/AndroidManifest.xml"/>
- </issue>
-
</issues>
diff --git a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/RecyclerViewMatcher.kt b/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/RecyclerViewMatcher.kt
deleted file mode 100644
index c5093f3ceb..0000000000
--- a/android/app/src/androidTest/kotlin/net/mullvad/mullvadvpn/RecyclerViewMatcher.kt
+++ /dev/null
@@ -1,52 +0,0 @@
-package net.mullvad.mullvadvpn
-
-import android.content.res.Resources
-import android.content.res.Resources.NotFoundException
-import android.view.View
-import androidx.recyclerview.widget.RecyclerView
-import org.hamcrest.Description
-import org.hamcrest.Matcher
-import org.hamcrest.TypeSafeMatcher
-
-class RecyclerViewMatcher(private val recyclerViewId: Int) {
- fun atPosition(position: Int): Matcher<View> {
- return atPositionOnView(position)
- }
-
- fun atPositionOnView(position: Int, targetViewId: Int? = null): Matcher<View> =
- object : TypeSafeMatcher<View>() {
- var resources: Resources? = null
- var childView: View? = null
-
- override fun describeTo(description: Description) {
- val idDescription =
- resources?.let {
- try {
- it.getResourceName(recyclerViewId)
- } catch (var4: NotFoundException) {
- "$recyclerViewId (resource name not found)"
- }
- }
- ?: recyclerViewId.toString()
- description.appendText("with id: $idDescription")
- }
-
- override fun matchesSafely(view: View): Boolean {
- resources = view.resources
- val recyclerView = view.rootView.findViewById<View>(recyclerViewId) as RecyclerView?
- if (recyclerView == null || recyclerView.id != recyclerViewId) {
- return false
- }
- childView = recyclerView.findViewHolderForAdapterPosition(position)?.itemView
- val targetView =
- targetViewId?.let { id -> childView?.findViewById<View>(id) } ?: childView
- return view == targetView
- }
- }
-
- companion object {
- fun withRecyclerView(recyclerViewId: Int): RecyclerViewMatcher {
- return RecyclerViewMatcher(recyclerViewId)
- }
- }
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/DnsCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/DnsCell.kt
index d8242c309a..4d6fb89834 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/DnsCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/DnsCell.kt
@@ -9,14 +9,11 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
-import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
-import androidx.compose.ui.unit.sp
import net.mullvad.mullvadvpn.R
import net.mullvad.mullvadvpn.lib.theme.AppTheme
@@ -58,12 +55,10 @@ fun DnsCell(
@Composable
private fun DnsTitle(address: String, modifier: Modifier = Modifier) {
- val textSize = dimensionResource(id = R.dimen.text_medium).value.sp
Text(
text = address,
color = Color.White,
- fontSize = textSize,
- fontStyle = FontStyle.Normal,
+ style = MaterialTheme.typography.labelLarge,
textAlign = TextAlign.Start,
modifier = modifier.wrapContentWidth(align = Alignment.End).wrapContentHeight()
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/InformationComposeCell.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/InformationComposeCell.kt
index 009edf90ef..1ee34a908a 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/InformationComposeCell.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/cell/InformationComposeCell.kt
@@ -12,13 +12,13 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import net.mullvad.mullvadvpn.R
import net.mullvad.mullvadvpn.lib.theme.AlphaInactive
import net.mullvad.mullvadvpn.lib.theme.AlphaVisible
+import net.mullvad.mullvadvpn.lib.theme.Dimens
import net.mullvad.mullvadvpn.lib.theme.MullvadBlue
import net.mullvad.mullvadvpn.lib.theme.MullvadWhite
@@ -62,7 +62,6 @@ fun InformationComposeCell(
@Composable
private fun InformationComposeCellBody(modifier: Modifier, onInfoClicked: (() -> Unit)? = null) {
- val horizontalPadding = dimensionResource(id = R.dimen.medium_padding)
val verticalPadding = 13.dp
Row(
modifier = modifier.wrapContentWidth().wrapContentHeight(),
@@ -73,8 +72,8 @@ private fun InformationComposeCellBody(modifier: Modifier, onInfoClicked: (() ->
modifier =
Modifier.clickable { onInfoClicked() }
.padding(
- start = horizontalPadding,
- end = horizontalPadding,
+ start = Dimens.mediumPadding,
+ end = Dimens.mediumPadding,
top = verticalPadding,
bottom = verticalPadding
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DeviceRemovalDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DeviceRemovalDialog.kt
index a7962ead63..e55a549e27 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DeviceRemovalDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DeviceRemovalDialog.kt
@@ -18,7 +18,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
-import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
@@ -28,6 +27,7 @@ import net.mullvad.mullvadvpn.R
import net.mullvad.mullvadvpn.compose.component.HtmlText
import net.mullvad.mullvadvpn.compose.component.textResource
import net.mullvad.mullvadvpn.lib.common.util.capitalizeFirstCharOfEachWord
+import net.mullvad.mullvadvpn.lib.theme.Dimens
import net.mullvad.mullvadvpn.model.Device
@Preview
@@ -68,11 +68,8 @@ fun ShowDeviceRemovalDialog(onDismiss: () -> Unit, onConfirm: () -> Unit, device
dismissButton = {
Button(
modifier =
- Modifier.height(dimensionResource(id = R.dimen.button_height))
- .defaultMinSize(
- minWidth = 0.dp,
- minHeight = dimensionResource(id = R.dimen.button_height)
- )
+ Modifier.height(Dimens.buttonHeight)
+ .defaultMinSize(minWidth = 0.dp, minHeight = Dimens.buttonHeight)
.fillMaxWidth(),
colors =
ButtonDefaults.buttonColors(
@@ -90,11 +87,8 @@ fun ShowDeviceRemovalDialog(onDismiss: () -> Unit, onConfirm: () -> Unit, device
contentPadding = PaddingValues(0.dp),
modifier =
Modifier.focusRequester(FocusRequester())
- .height(dimensionResource(id = R.dimen.button_height))
- .defaultMinSize(
- minWidth = 0.dp,
- minHeight = dimensionResource(id = R.dimen.button_height)
- )
+ .height(Dimens.buttonHeight)
+ .defaultMinSize(minWidth = 0.dp, minHeight = Dimens.buttonHeight)
.fillMaxWidth(),
colors =
ButtonDefaults.buttonColors(
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DnsDialog.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DnsDialog.kt
index 06e2e8311c..52077dbfba 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DnsDialog.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/dialog/DnsDialog.kt
@@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentSize
-import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
@@ -18,16 +17,17 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.stringResource
+import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
-import androidx.compose.ui.unit.sp
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import net.mullvad.mullvadvpn.R
+import net.mullvad.mullvadvpn.compose.button.ActionButton
import net.mullvad.mullvadvpn.compose.textfield.DnsTextField
import net.mullvad.mullvadvpn.lib.theme.AppTheme
+import net.mullvad.mullvadvpn.lib.theme.Dimens
import net.mullvad.mullvadvpn.lib.theme.MullvadBlue
import net.mullvad.mullvadvpn.lib.theme.MullvadRed
import net.mullvad.mullvadvpn.lib.theme.MullvadWhite
@@ -61,16 +61,12 @@ fun DnsDialog(
onRemove: () -> Unit,
onDismiss: () -> Unit
) {
- val buttonSize = dimensionResource(id = R.dimen.button_height)
- val mediumPadding = dimensionResource(id = R.dimen.medium_padding)
+ val buttonSize = Dimens.buttonHeight
+ val mediumPadding = Dimens.mediumPadding
val dialogPadding = 20.dp
val midPadding = 10.dp
val smallPadding = 5.dp
- val textSmallSize = dimensionResource(id = R.dimen.text_small).value.sp
- val textMediumSize = dimensionResource(id = R.dimen.text_medium_plus).value.sp
- val textBigSize = dimensionResource(id = R.dimen.text_big).value.sp
-
val textFieldFocusRequester = FocusRequester()
Dialog(
@@ -84,7 +80,7 @@ fun DnsDialog(
.fillMaxWidth(0.8f)
.background(
color = MaterialTheme.colorScheme.background,
- MaterialTheme.shapes.extraLarge
+ shape = MaterialTheme.shapes.extraLarge
)
.padding(dialogPadding)
) {
@@ -96,7 +92,8 @@ fun DnsDialog(
stringResource(R.string.update_dns_server_dialog_title)
},
color = Color.White,
- fontSize = textBigSize
+ style =
+ MaterialTheme.typography.headlineSmall.copy(fontWeight = FontWeight.Normal)
)
Box(
@@ -133,13 +130,13 @@ fun DnsDialog(
if (errorMessage != null) {
Text(
text = errorMessage,
- fontSize = textSmallSize,
+ style = MaterialTheme.typography.bodySmall,
color = MullvadRed,
modifier = Modifier.padding(top = smallPadding)
)
}
- Button(
+ ActionButton(
modifier =
Modifier.padding(top = mediumPadding)
.height(buttonSize)
@@ -153,17 +150,12 @@ fun DnsDialog(
disabledContainerColor = MullvadWhite20
),
onClick = { onAttemptToSave() },
- enabled = stagedDns.isValid(),
- shape = MaterialTheme.shapes.small
- ) {
- Text(
- text = stringResource(id = R.string.submit_button),
- fontSize = textMediumSize
- )
- }
+ isEnabled = stagedDns.isValid(),
+ text = stringResource(id = R.string.submit_button),
+ )
if (stagedDns is StagedDns.EditDns) {
- Button(
+ ActionButton(
modifier =
Modifier.padding(top = mediumPadding)
.height(buttonSize)
@@ -175,16 +167,11 @@ fun DnsDialog(
contentColor = MullvadWhite
),
onClick = { onRemove() },
- shape = MaterialTheme.shapes.small
- ) {
- Text(
- text = stringResource(id = R.string.remove_button),
- fontSize = textMediumSize
- )
- }
+ text = stringResource(id = R.string.remove_button)
+ )
}
- Button(
+ ActionButton(
modifier =
Modifier.padding(top = mediumPadding)
.height(buttonSize)
@@ -196,10 +183,8 @@ fun DnsDialog(
contentColor = Color.White
),
onClick = { onDismiss() },
- shape = MaterialTheme.shapes.small
- ) {
- Text(text = stringResource(id = R.string.cancel), fontSize = textMediumSize)
- }
+ text = stringResource(id = R.string.cancel)
+ )
}
}
)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/PrivacyDisclaimerScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/PrivacyDisclaimerScreen.kt
index 3de32531e8..4fd2b2719e 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/PrivacyDisclaimerScreen.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/PrivacyDisclaimerScreen.kt
@@ -17,7 +17,6 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
-import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
@@ -33,6 +32,7 @@ import net.mullvad.mullvadvpn.R
import net.mullvad.mullvadvpn.compose.button.ActionButton
import net.mullvad.mullvadvpn.compose.component.ScaffoldWithTopBar
import net.mullvad.mullvadvpn.lib.theme.AppTheme
+import net.mullvad.mullvadvpn.lib.theme.Dimens
@Preview
@Composable
@@ -61,7 +61,7 @@ fun PrivacyDisclaimerScreen(
.background(color = MaterialTheme.colorScheme.background)
) {
val (body, actionButtons) = createRefs()
- val sideMargin = dimensionResource(id = R.dimen.side_margin)
+ val sideMargin = Dimens.sideMargin
Column(
modifier =
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/CustomTransformationMethod.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/CustomTransformationMethod.kt
deleted file mode 100644
index 451c51fa3f..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/CustomTransformationMethod.kt
+++ /dev/null
@@ -1,50 +0,0 @@
-package net.mullvad.mullvadvpn.ui
-
-import android.graphics.Rect
-import android.text.method.PasswordTransformationMethod
-import android.text.method.TransformationMethod
-import android.view.View
-
-private const val BIG_DOT_CHAR = '●'
-private const val DOT_CHAR = '\u2022'
-private const val EMPTY_STRING = ""
-private const val SPACE_CHAR = ' '
-
-class GroupedTransformationMethod : TransformationMethod {
- override fun getTransformation(source: CharSequence?, view: View?): CharSequence {
- return source?.groupWithSpaces() ?: EMPTY_STRING
- }
-
- override fun onFocusChanged(
- view: View?,
- sourceText: CharSequence?,
- focused: Boolean,
- direction: Int,
- previouslyFocusedRect: Rect?
- ) {
- // No focus handling required.
- }
-}
-
-class GroupedPasswordTransformationMethod : PasswordTransformationMethod() {
- override fun getTransformation(source: CharSequence?, view: View?): CharSequence {
- return if (source != null && view != null) {
- super.getTransformation(source, view)
- ?.toString()
- ?.replace(DOT_CHAR, BIG_DOT_CHAR)
- ?.groupWithSpaces()
- ?: EMPTY_STRING
- } else {
- EMPTY_STRING
- }
- }
-}
-
-private fun CharSequence.groupWithSpaces(groupCharSize: Int = 4): CharSequence {
- return fold(StringBuilder()) { formattedText, nextDigit ->
- if ((formattedText.length % (groupCharSize + 1)) == groupCharSize) {
- formattedText.append(SPACE_CHAR)
- }
- formattedText.append(nextDigit)
- }
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/NavigationBarPainter.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/NavigationBarPainter.kt
deleted file mode 100644
index 1047793f6f..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/NavigationBarPainter.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package net.mullvad.mullvadvpn.ui
-
-import android.app.Activity
-import androidx.annotation.ColorInt
-
-interface NavigationBarPainter : SystemPainter
-
-fun NavigationBarPainter.paintNavigationBar(@ColorInt color: Int) {
- (getContext() as Activity?)?.window?.navigationBarColor = color
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/StatusBarPainter.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/StatusBarPainter.kt
deleted file mode 100644
index 48f94e17b5..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/StatusBarPainter.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-package net.mullvad.mullvadvpn.ui
-
-import android.app.Activity
-import androidx.annotation.ColorInt
-
-interface StatusBarPainter : SystemPainter
-
-fun StatusBarPainter.paintStatusBar(@ColorInt color: Int) {
- (getContext() as Activity?)?.window?.statusBarColor = color
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/SystemPainter.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/SystemPainter.kt
deleted file mode 100644
index 2f0fc32775..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/SystemPainter.kt
+++ /dev/null
@@ -1,7 +0,0 @@
-package net.mullvad.mullvadvpn.ui
-
-import android.content.Context
-
-interface SystemPainter {
- fun getContext(): Context?
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/AccountFragment.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/AccountFragment.kt
index b0784d62a9..3bd46d9f52 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/AccountFragment.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/AccountFragment.kt
@@ -11,13 +11,11 @@ import androidx.compose.ui.platform.ComposeView
import net.mullvad.mullvadvpn.R
import net.mullvad.mullvadvpn.compose.screen.AccountScreen
import net.mullvad.mullvadvpn.lib.theme.AppTheme
-import net.mullvad.mullvadvpn.ui.NavigationBarPainter
-import net.mullvad.mullvadvpn.ui.StatusBarPainter
import net.mullvad.mullvadvpn.ui.extension.requireMainActivity
import net.mullvad.mullvadvpn.viewmodel.AccountViewModel
import org.koin.androidx.viewmodel.ext.android.viewModel
-class AccountFragment : BaseFragment(), StatusBarPainter, NavigationBarPainter {
+class AccountFragment : BaseFragment() {
private val vm by viewModel<AccountViewModel>()
@OptIn(ExperimentalMaterial3Api::class)
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/ConnectFragment.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/ConnectFragment.kt
index afb2ec9d94..374b27e668 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/ConnectFragment.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/ConnectFragment.kt
@@ -12,12 +12,11 @@ import net.mullvad.mullvadvpn.R
import net.mullvad.mullvadvpn.compose.screen.ConnectScreen
import net.mullvad.mullvadvpn.lib.theme.AppTheme
import net.mullvad.mullvadvpn.ui.MainActivity
-import net.mullvad.mullvadvpn.ui.NavigationBarPainter
import net.mullvad.mullvadvpn.util.appendHideNavOnPlayBuild
import net.mullvad.mullvadvpn.viewmodel.ConnectViewModel
import org.koin.androidx.viewmodel.ext.android.viewModel
-class ConnectFragment : BaseFragment(), NavigationBarPainter {
+class ConnectFragment : BaseFragment() {
// Injected dependencies
private val connectViewModel: ConnectViewModel by viewModel()
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/LoadingFragment.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/LoadingFragment.kt
index 0000351c33..d2f0cbfb6e 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/LoadingFragment.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/LoadingFragment.kt
@@ -10,10 +10,8 @@ import net.mullvad.mullvadvpn.R
import net.mullvad.mullvadvpn.compose.screen.LoadingScreen
import net.mullvad.mullvadvpn.lib.theme.AppTheme
import net.mullvad.mullvadvpn.ui.MainActivity
-import net.mullvad.mullvadvpn.ui.NavigationBarPainter
-import net.mullvad.mullvadvpn.ui.StatusBarPainter
-class LoadingFragment : Fragment(), StatusBarPainter, NavigationBarPainter {
+class LoadingFragment : Fragment() {
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/LoginFragment.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/LoginFragment.kt
index 9fd6e5aceb..92d58066ee 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/LoginFragment.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/LoginFragment.kt
@@ -13,12 +13,11 @@ import net.mullvad.mullvadvpn.compose.screen.LoginScreen
import net.mullvad.mullvadvpn.lib.theme.AppTheme
import net.mullvad.mullvadvpn.model.AccountToken
import net.mullvad.mullvadvpn.ui.MainActivity
-import net.mullvad.mullvadvpn.ui.NavigationBarPainter
import net.mullvad.mullvadvpn.viewmodel.LoginUiSideEffect
import net.mullvad.mullvadvpn.viewmodel.LoginViewModel
import org.koin.androidx.viewmodel.ext.android.viewModel
-class LoginFragment : BaseFragment(), NavigationBarPainter {
+class LoginFragment : BaseFragment() {
private val vm: LoginViewModel by viewModel()
override fun onCreateView(
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/PrivacyDisclaimerFragment.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/PrivacyDisclaimerFragment.kt
index 4b500d3f58..ed45382013 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/PrivacyDisclaimerFragment.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/PrivacyDisclaimerFragment.kt
@@ -13,13 +13,11 @@ import net.mullvad.mullvadvpn.compose.screen.PrivacyDisclaimerScreen
import net.mullvad.mullvadvpn.lib.endpoint.getApiEndpointConfigurationExtras
import net.mullvad.mullvadvpn.lib.theme.AppTheme
import net.mullvad.mullvadvpn.ui.MainActivity
-import net.mullvad.mullvadvpn.ui.NavigationBarPainter
-import net.mullvad.mullvadvpn.ui.StatusBarPainter
import net.mullvad.mullvadvpn.util.appendHideNavOnPlayBuild
import net.mullvad.mullvadvpn.viewmodel.PrivacyDisclaimerViewModel
import org.koin.android.ext.android.inject
-class PrivacyDisclaimerFragment : Fragment(), StatusBarPainter, NavigationBarPainter {
+class PrivacyDisclaimerFragment : Fragment() {
private val privacyDisclaimerViewModel: PrivacyDisclaimerViewModel by inject()
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/SelectLocationFragment.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/SelectLocationFragment.kt
index d56b51850b..d1c4ac72bf 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/SelectLocationFragment.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/SelectLocationFragment.kt
@@ -9,12 +9,10 @@ import androidx.compose.ui.platform.ComposeView
import net.mullvad.mullvadvpn.R
import net.mullvad.mullvadvpn.compose.screen.SelectLocationScreen
import net.mullvad.mullvadvpn.lib.theme.AppTheme
-import net.mullvad.mullvadvpn.ui.NavigationBarPainter
-import net.mullvad.mullvadvpn.ui.StatusBarPainter
import net.mullvad.mullvadvpn.viewmodel.SelectLocationViewModel
import org.koin.androidx.viewmodel.ext.android.viewModel
-class SelectLocationFragment : BaseFragment(), StatusBarPainter, NavigationBarPainter {
+class SelectLocationFragment : BaseFragment() {
private val vm by viewModel<SelectLocationViewModel>()
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/SettingsFragment.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/SettingsFragment.kt
index 64b3e6b425..e5faf6bb11 100644
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/SettingsFragment.kt
+++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/SettingsFragment.kt
@@ -11,12 +11,10 @@ import androidx.fragment.app.Fragment
import net.mullvad.mullvadvpn.R
import net.mullvad.mullvadvpn.compose.screen.SettingsScreen
import net.mullvad.mullvadvpn.lib.theme.AppTheme
-import net.mullvad.mullvadvpn.ui.NavigationBarPainter
-import net.mullvad.mullvadvpn.ui.StatusBarPainter
import net.mullvad.mullvadvpn.viewmodel.SettingsViewModel
import org.koin.androidx.viewmodel.ext.android.viewModel
-class SettingsFragment : BaseFragment(), StatusBarPainter, NavigationBarPainter {
+class SettingsFragment : BaseFragment() {
private val vm by viewModel<SettingsViewModel>()
@OptIn(ExperimentalMaterial3Api::class)
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
deleted file mode 100644
index efa2d6f5a6..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/BackButton.kt
+++ /dev/null
@@ -1,75 +0,0 @@
-package net.mullvad.mullvadvpn.ui.widget
-
-import android.content.Context
-import android.util.AttributeSet
-import android.util.TypedValue
-import android.view.Gravity
-import android.view.LayoutInflater
-import android.widget.LinearLayout
-import android.widget.TextView
-import net.mullvad.mullvadvpn.R
-
-class BackButton : LinearLayout {
- private val container =
- context.getSystemService(Context.LAYOUT_INFLATER_SERVICE).let { service ->
- val inflater = service as LayoutInflater
-
- inflater.inflate(R.layout.settings_back_button, this)
- }
-
- private val label = container.findViewById<TextView>(R.id.label)
-
- constructor(context: Context) : super(context)
-
- constructor(context: Context, attributes: AttributeSet) : super(context, attributes) {
- loadAttributes(attributes)
- }
-
- constructor(
- context: Context,
- attributes: AttributeSet,
- defaultStyleAttribute: Int
- ) : super(context, attributes, defaultStyleAttribute) {
- loadAttributes(attributes)
- }
-
- constructor(
- context: Context,
- attributes: AttributeSet,
- defaultStyleAttribute: Int,
- defaultStyleResource: Int
- ) : super(context, attributes, defaultStyleAttribute, defaultStyleResource) {
- loadAttributes(attributes)
- }
-
- init {
- isFocusable = true
- isClickable = true
- gravity = Gravity.CENTER_VERTICAL or Gravity.START
- orientation = HORIZONTAL
-
- resources.getDimensionPixelSize(R.dimen.settings_back_button_padding).let { padding ->
- setPadding(padding, padding, padding, padding)
- }
-
- loadBackground()
- }
-
- private fun loadAttributes(attributes: AttributeSet) {
- context.theme.obtainStyledAttributes(attributes, R.styleable.TextAttribute, 0, 0).apply {
- try {
- label.text = getString(R.styleable.TextAttribute_text) ?: ""
- } finally {
- recycle()
- }
- }
- }
-
- private fun loadBackground() {
- val typedValue = TypedValue()
-
- context.theme.resolveAttribute(android.R.attr.selectableItemBackground, typedValue, true)
-
- setBackgroundResource(typedValue.resourceId)
- }
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/Button.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/Button.kt
deleted file mode 100644
index e6c266683b..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/Button.kt
+++ /dev/null
@@ -1,171 +0,0 @@
-package net.mullvad.mullvadvpn.ui.widget
-
-import android.content.Context
-import android.graphics.drawable.Drawable
-import android.util.AttributeSet
-import android.view.LayoutInflater
-import android.view.View
-import android.widget.FrameLayout
-import android.widget.ImageView
-import net.mullvad.mullvadvpn.R
-import net.mullvad.mullvadvpn.lib.common.util.JobTracker
-
-open class Button : FrameLayout {
- enum class ButtonColor {
- Blue,
- Green,
- Red;
-
- companion object {
- internal fun fromCode(code: Int): ButtonColor {
- when (code) {
- 0 -> return Blue
- 1 -> return Green
- 2 -> return Red
- else -> throw Exception("Invalid buttonColor attribute value")
- }
- }
- }
- }
-
- private val container =
- context.getSystemService(Context.LAYOUT_INFLATER_SERVICE).let { service ->
- val inflater = service as LayoutInflater
-
- inflater.inflate(R.layout.button, this)
- }
-
- private val button = container.findViewById<android.widget.Button>(R.id.button)
- private val spinner: View = container.findViewById(R.id.spinner)
- private val image: ImageView = container.findViewById(R.id.image)
-
- private var clickJobName: String? = null
- private var onClickAction: (suspend () -> Unit)? = null
-
- protected var jobTracker: JobTracker? = null
-
- var buttonColor: ButtonColor = ButtonColor.Blue
- set(value) {
- field = value
-
- val backgroundResource =
- when (value) {
- ButtonColor.Blue -> R.drawable.blue_button_background
- ButtonColor.Green -> R.drawable.green_button_background
- ButtonColor.Red -> R.drawable.red_button_background
- }
-
- button.setBackgroundResource(backgroundResource)
- }
-
- var detailImage: Drawable? = null
- set(value) {
- field = value
-
- image.apply {
- if (value == null) {
- visibility = GONE
- } else {
- visibility = VISIBLE
- setImageDrawable(value)
- }
- }
- }
-
- var label: CharSequence
- get() = button.text
- set(value) {
- button.text = value
- }
-
- var showSpinner = false
-
- constructor(context: Context) : super(context)
-
- constructor(context: Context, attributes: AttributeSet) : super(context, attributes) {
- loadAttributes(attributes)
- }
-
- constructor(
- context: Context,
- attributes: AttributeSet,
- defaultStyleAttribute: Int
- ) : super(context, attributes, defaultStyleAttribute) {
- loadAttributes(attributes)
- }
-
- constructor(
- context: Context,
- attributes: AttributeSet,
- defaultStyleAttribute: Int,
- defaultStyleResource: Int
- ) : super(context, attributes, defaultStyleAttribute, defaultStyleResource) {
- loadAttributes(attributes)
- }
-
- override fun setEnabled(enabled: Boolean) {
- super.setEnabled(enabled)
- button.isEnabled = enabled
-
- if (enabled) {
- alpha = 1.0f
- } else {
- alpha = 0.5f
- }
- }
-
- init {
- button.setOnClickListener {
- jobTracker?.newUiJob(clickJobName!!) {
- isEnabled = false
-
- if (showSpinner) {
- image.visibility = GONE
- spinner.visibility = VISIBLE
- }
-
- onClickAction!!.invoke()
-
- spinner.visibility = GONE
-
- if (detailImage != null) {
- image.visibility = VISIBLE
- }
-
- isEnabled = true
- }
- }
- }
-
- fun setOnClickAction(jobName: String, tracker: JobTracker, action: suspend () -> Unit) {
- clickJobName = jobName
- jobTracker = tracker
- onClickAction = action
- }
-
- fun setText(textResource: Int) {
- button.setText(textResource)
- }
-
- private fun loadAttributes(attributes: AttributeSet) {
- var styleableId = R.styleable.Button
-
- context.theme.obtainStyledAttributes(attributes, styleableId, 0, 0).apply {
- try {
- buttonColor = ButtonColor.fromCode(getInteger(R.styleable.Button_buttonColor, 0))
- detailImage = getDrawable(R.styleable.Button_detailImage)
- showSpinner = getBoolean(R.styleable.Button_showSpinner, false)
- } finally {
- recycle()
- }
- }
-
- context.theme.obtainStyledAttributes(attributes, R.styleable.TextAttribute, 0, 0).apply {
- try {
- button.text = getString(R.styleable.TextAttribute_text) ?: ""
- } finally {
- recycle()
- }
- }
- }
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/HeaderBar.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/HeaderBar.kt
deleted file mode 100644
index 788bc92691..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/HeaderBar.kt
+++ /dev/null
@@ -1,73 +0,0 @@
-package net.mullvad.mullvadvpn.ui.widget
-
-import android.content.Context
-import android.util.AttributeSet
-import android.view.Gravity
-import android.view.LayoutInflater
-import android.view.View
-import android.widget.LinearLayout
-import androidx.core.content.ContextCompat
-import androidx.core.view.isVisible
-import kotlin.properties.Delegates.observable
-import net.mullvad.mullvadvpn.R
-import net.mullvad.mullvadvpn.model.TunnelState
-import net.mullvad.mullvadvpn.ui.MainActivity
-import net.mullvad.mullvadvpn.ui.StatusBarPainter
-import net.mullvad.mullvadvpn.ui.paintStatusBar
-
-class HeaderBar
-@JvmOverloads
-constructor(
- context: Context,
- attributes: AttributeSet? = null,
- defStyleAttr: Int = 0,
- defStyleRes: Int = 0
-) : LinearLayout(context, attributes, defStyleAttr, defStyleRes), StatusBarPainter {
- private val container = LayoutInflater.from(context).inflate(R.layout.header_bar, this)
- private val settingsButton = findViewById<View>(R.id.settings)
- private val accountButton = findViewById<View>(R.id.account)
-
- private val disabledColor = ContextCompat.getColor(context, android.R.color.transparent)
- private val securedColor = ContextCompat.getColor(context, R.color.green)
- private val unsecuredColor = ContextCompat.getColor(context, R.color.red)
-
- var tunnelState by
- observable<TunnelState?>(null) { _, _, state ->
- val backgroundColor =
- if (state == null) {
- disabledColor
- } else if (state.isSecured()) {
- securedColor
- } else {
- unsecuredColor
- }
-
- container.setBackgroundColor(backgroundColor)
- paintStatusBar(backgroundColor)
- }
-
- init {
- gravity = Gravity.CENTER_VERTICAL
- orientation = HORIZONTAL
-
- accountButton.apply {
- isEnabled = true
- setOnClickListener { (context as? MainActivity)?.openAccount() }
- }
-
- settingsButton.apply {
- isEnabled = true
- setOnClickListener { (context as? MainActivity)?.openSettings() }
- }
-
- tunnelState = null
- }
-
- fun setAccountButtonVisibility(isVisible: Boolean) {
- accountButton.isVisible = isVisible
- }
-
- fun setSettingsButtonEnabled(isEnabled: Boolean) {
- settingsButton.isEnabled = isEnabled
- }
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/ListenableScrollView.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/ListenableScrollView.kt
deleted file mode 100644
index 0b65325f42..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/ListenableScrollView.kt
+++ /dev/null
@@ -1,31 +0,0 @@
-package net.mullvad.mullvadvpn.ui.widget
-
-import android.content.Context
-import android.util.AttributeSet
-import android.widget.ScrollView
-import net.mullvad.mullvadvpn.util.ListenableScrollableView
-
-class ListenableScrollView : ScrollView, ListenableScrollableView {
- override val horizontalScrollOffset
- get() = scrollX
-
- override val verticalScrollOffset
- get() = scrollY
-
- override var onScrollListener: ((Int, Int, Int, Int) -> Unit)? = null
-
- constructor(context: Context) : super(context)
-
- constructor(context: Context, attributes: AttributeSet) : super(context, attributes)
-
- constructor(
- context: Context,
- attributes: AttributeSet,
- defaultStyleAttribute: Int
- ) : super(context, attributes, defaultStyleAttribute)
-
- override fun onScrollChanged(left: Int, top: Int, oldLeft: Int, oldTop: Int) {
- super.onScrollChanged(left, top, oldLeft, oldTop)
- onScrollListener?.invoke(left, top, oldLeft, oldTop)
- }
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/Debouncer.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/Debouncer.kt
deleted file mode 100644
index 4d0406cdc3..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/Debouncer.kt
+++ /dev/null
@@ -1,41 +0,0 @@
-package net.mullvad.mullvadvpn.util
-
-import kotlin.properties.Delegates.observable
-import kotlinx.coroutines.delay
-import net.mullvad.mullvadvpn.lib.common.util.JobTracker
-
-// Helper to filter out bursts of events so that only the latest event in an interval is notified.
-//
-// An interval of zero means that it will only debounce events that are sent before the job is
-// started. If the events are coming from the UI thread, this means that this class will only send
-// the last event received before the UI thread finishes its current task.
-//
-// This can be used for example to filter out focus events coming from different views. Android will
-// first send a "focus lost" event from a view followed by a "focus gained" event from another view.
-// If the only thing the listener is interested in is if any of a set of views has focus, this class
-// can be used to debounce focus events from the set of views to obtain an event that represents a
-// change from when the set contains a focused view to when the set contains no focused views (and
-// an event for the reverse situation).
-class Debouncer<T>(initialValue: T, val intervalInMs: Long = 0) {
- private val jobTracker = JobTracker()
-
- var listener: ((T) -> Unit)? = null
-
- var debouncedValue = initialValue
- private set
-
- var rawValue by
- observable(initialValue) { _, oldValue, newValue ->
- if (newValue != oldValue) {
- jobTracker.cancelJob("notifyNewValue")
-
- if (newValue != debouncedValue) {
- jobTracker.newUiJob("notifyNewValue") {
- delay(intervalInMs)
- listener?.invoke(newValue)
- debouncedValue = newValue
- }
- }
- }
- }
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/LinearInterpolation.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/LinearInterpolation.kt
deleted file mode 100644
index ff03844e91..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/LinearInterpolation.kt
+++ /dev/null
@@ -1,46 +0,0 @@
-package net.mullvad.mullvadvpn.util
-
-import kotlin.properties.Delegates.observable
-import kotlin.reflect.KProperty
-
-class LinearInterpolation {
- private val observer = { _: KProperty<*>, oldValue: Float, newValue: Float ->
- if (!updated && oldValue != newValue) {
- updated = true
- }
- }
-
- private val realStart
- get() = start - reference
-
- private val realEnd
- get() = end - reference
-
- var reference by observable(0.0f, observer)
- var start by observable(0.0f, observer)
- var end by observable(0.0f, observer)
-
- var updated = true
- get() {
- return if (field) {
- field = false
- true
- } else {
- false
- }
- }
-
- fun interpolate(progress: Float): Float {
- return progress * (realEnd - realStart) + realStart
- }
-
- fun progress(interpolation: Float): Float {
- val length = realEnd - realStart
-
- if (length == 0.0f) {
- return 0.0f
- }
-
- return (interpolation - realStart) / length
- }
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/ListenableScrollableView.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/ListenableScrollableView.kt
deleted file mode 100644
index 61deecacb2..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/ListenableScrollableView.kt
+++ /dev/null
@@ -1,8 +0,0 @@
-package net.mullvad.mullvadvpn.util
-
-interface ListenableScrollableView {
- val horizontalScrollOffset: Int
- val verticalScrollOffset: Int
-
- var onScrollListener: ((Int, Int, Int, Int) -> Unit)?
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/SegmentedInputFormatter.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/SegmentedInputFormatter.kt
deleted file mode 100644
index 6d3a3e5cc8..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/SegmentedInputFormatter.kt
+++ /dev/null
@@ -1,147 +0,0 @@
-package net.mullvad.mullvadvpn.util
-
-import android.text.Editable
-import android.text.TextWatcher
-import android.widget.EditText
-import java.util.Locale
-
-class SegmentedInputFormatter(val input: EditText, var separator: Char) : TextWatcher {
- private var editing = false
- private var removing = false
- private var separatorSkipCount = 5
-
- var allCaps = false
- var isValidInputCharacter: (Char) -> Boolean = { _ -> true }
-
- var segmentSize = 4
- set(value) {
- field = value
- separatorSkipCount = value + 1
- }
-
- init {
- input.addTextChangedListener(this)
- }
-
- override fun beforeTextChanged(text: CharSequence, start: Int, count: Int, after: Int) {
- if (!editing) {
- editing = true
- removing = after < count
- }
- }
-
- override fun onTextChanged(text: CharSequence, start: Int, before: Int, count: Int) {}
-
- override fun afterTextChanged(text: Editable) {
- val string = text.toString()
-
- if (isValidInput(string)) {
- editing = false
- maybeUpdateSelection(text)
- } else {
- formatInput(text)
- }
- }
-
- private fun maybeUpdateSelection(text: Editable) {
- if (removing) {
- var start = input.selectionStart
- var end = input.selectionEnd
- var changed = false
-
- if (start % separatorSkipCount == 0 && start > 0) {
- start -= 1
- changed = true
- }
-
- if (end % separatorSkipCount == 0 && end > 0) {
- end -= 1
- changed = true
- }
-
- if (changed) {
- input.setSelection(start, end)
-
- if (start == end && end == text.length - 1) {
- // The cursor was previously at the last character, and now after the character
- // was removed it has been moved to before the separator. It's best now to
- // remove the unnecessary trailing separator
- text.delete(text.length - 1, text.length)
- }
- }
- }
- }
-
- private fun isValidInput(string: String): Boolean {
- return string.asSequence().withIndex().all { item ->
- val index = item.index
- val character = item.value
-
- if ((index + 1) % separatorSkipCount == 0) {
- character == separator
- } else {
- isValidInputCharacter(character)
- }
- }
- }
-
- private fun formatInput(input: Editable) {
- var index = 0
- val length = input.length
- var changed = false
-
- while (index < length && !changed) {
- val segmentStart = index
- val segmentEnd = index + segmentSize - 1
- val separatorPosition = segmentEnd + 1
-
- changed =
- formatSegment(input, segmentStart..segmentEnd) ||
- formatSeparator(input, separatorPosition)
-
- index = separatorPosition + 1
- }
- }
-
- private fun formatSegment(input: Editable, range: IntRange): Boolean {
- val length = input.length
- val start = range.start
- var end = range.endInclusive
-
- if (start < length) {
- end = minOf(end, length - 1)
-
- for (index in start..end) {
- val character = input[index]
-
- if (allCaps && character >= 'a' && character <= 'z') {
- input.replace(
- index,
- index + 1,
- character.toString().uppercase(Locale.getDefault())
- )
- } else if (!isValidInputCharacter(character)) {
- input.delete(index, index + 1)
- } else {
- // Only continue looping if no changes were made to the string
- continue
- }
-
- // Abort loop because the input was edited and `afterTextChanged` will be called
- // again
- return true
- }
- }
-
- return false
- }
-
- private fun formatSeparator(input: Editable, index: Int): Boolean {
- if (index < input.length && input[index] != separator) {
- input.insert(index, "$separator")
- return true
- } else {
- return false
- }
- }
-}
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/SegmentedTextFormatter.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/SegmentedTextFormatter.kt
deleted file mode 100644
index 4ba6fe97e0..0000000000
--- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/util/SegmentedTextFormatter.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-package net.mullvad.mullvadvpn.util
-
-class SegmentedTextFormatter(var separator: Char) {
- var isValidInputCharacter: (Char) -> Boolean = { _ -> true }
- var segmentSize = 4
-
- fun format(string: String) =
- string
- .asSequence()
- .filter(isValidInputCharacter)
- .chunked(segmentSize)
- .map { segmentCharacters -> segmentCharacters.joinToString("") }
- .joinToString("$separator")
-}
diff --git a/android/app/src/main/res/layout/button.xml b/android/app/src/main/res/layout/button.xml
deleted file mode 100644
index 5db4501a46..0000000000
--- a/android/app/src/main/res/layout/button.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
- <Button android:id="@+id/button"
- android:gravity="center"
- android:text=""
- style="@style/Button" />
- <ProgressBar android:id="@+id/spinner"
- android:layout_width="20dp"
- android:layout_height="20dp"
- android:layout_marginHorizontal="9dp"
- android:layout_gravity="end|center_vertical"
- android:indeterminate="true"
- android:indeterminateOnly="true"
- android:indeterminateDuration="600"
- android:indeterminateDrawable="@drawable/icon_spinner"
- android:visibility="gone" />
- <ImageView android:id="@+id/image"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginHorizontal="9dp"
- android:layout_gravity="end|center_vertical"
- android:src="@android:color/transparent"
- android:visibility="gone" />
-</merge>
diff --git a/android/app/src/main/res/layout/header_bar.xml b/android/app/src/main/res/layout/header_bar.xml
deleted file mode 100644
index f040afd9cb..0000000000
--- a/android/app/src/main/res/layout/header_bar.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<merge xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto">
- <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent"
- android:layout_height="@dimen/top_bar_height">
-
- <ImageView android:id="@+id/appIcon"
- android:layout_width="44dp"
- android:layout_height="44dp"
- android:src="@drawable/logo_icon"
- android:layout_marginStart="16dp"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent" />
- <ImageView android:id="@+id/appLogo"
- android:layout_height="16dp"
- android:layout_width="wrap_content"
- android:adjustViewBounds="true"
- android:scaleType="fitCenter"
- android:src="@drawable/logo_text"
- android:layout_marginStart="8dp"
- android:alpha="0.8"
- app:layout_constraintStart_toEndOf="@id/appIcon"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent" />
- <ImageButton android:id="@+id/account"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:background="?android:attr/selectableItemBackground"
- android:paddingHorizontal="16dp"
- android:src="@drawable/icon_account"
- app:layout_constraintEnd_toStartOf="@id/settings"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"
- android:contentDescription="@string/settings_account" />
- <ImageButton android:id="@+id/settings"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:background="?android:attr/selectableItemBackground"
- android:paddingHorizontal="16dp"
- android:src="@drawable/icon_settings"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"
- android:contentDescription="@string/settings" />
- </androidx.constraintlayout.widget.ConstraintLayout>
-</merge>
diff --git a/android/app/src/main/res/layout/settings_back_button.xml b/android/app/src/main/res/layout/settings_back_button.xml
deleted file mode 100644
index 442437fca8..0000000000
--- a/android/app/src/main/res/layout/settings_back_button.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
- <ImageView android:layout_width="24dp"
- android:layout_height="24dp"
- android:layout_marginEnd="8dp"
- android:src="@drawable/icon_back" />
- <TextView android:id="@+id/label"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@color/white60"
- android:textSize="@dimen/text_small"
- android:textStyle="bold" />
-</merge>
diff --git a/android/lib/resource/lint-baseline.xml b/android/lib/resource/lint-baseline.xml
index 1fa0b32b28..02060c3f43 100644
--- a/android/lib/resource/lint-baseline.xml
+++ b/android/lib/resource/lint-baseline.xml
@@ -2,446 +2,6 @@
<issues format="6" by="lint 8.1.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.1.0)" variant="all" version="8.1.0">
<issue
- id="MissingQuantity"
- message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;days_left&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-es/plurals.xml"
- line="3"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
- errorLine1=" &lt;plurals name=&quot;days_left&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-fr/plurals.xml"
- line="3"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;days_left&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-it/plurals.xml"
- line="3"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;days_left&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-pt/plurals.xml"
- line="3"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;months_left&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-es/plurals.xml"
- line="7"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
- errorLine1=" &lt;plurals name=&quot;months_left&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-fr/plurals.xml"
- line="7"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;months_left&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-it/plurals.xml"
- line="7"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;months_left&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-pt/plurals.xml"
- line="7"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;years_left&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-es/plurals.xml"
- line="11"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
- errorLine1=" &lt;plurals name=&quot;years_left&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-fr/plurals.xml"
- line="11"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;years_left&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-it/plurals.xml"
- line="11"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;years_left&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-pt/plurals.xml"
- line="11"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;days_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-es/plurals.xml"
- line="15"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
- errorLine1=" &lt;plurals name=&quot;days_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-fr/plurals.xml"
- line="15"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;days_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-it/plurals.xml"
- line="15"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;days_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-pt/plurals.xml"
- line="15"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;minutes_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-es/plurals.xml"
- line="19"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
- errorLine1=" &lt;plurals name=&quot;minutes_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-fr/plurals.xml"
- line="19"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;minutes_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-it/plurals.xml"
- line="19"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;minutes_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-pt/plurals.xml"
- line="19"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;months_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-es/plurals.xml"
- line="23"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
- errorLine1=" &lt;plurals name=&quot;months_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-fr/plurals.xml"
- line="23"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;months_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-it/plurals.xml"
- line="23"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;months_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-pt/plurals.xml"
- line="23"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;years_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-es/plurals.xml"
- line="27"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
- errorLine1=" &lt;plurals name=&quot;years_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-fr/plurals.xml"
- line="27"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;years_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-it/plurals.xml"
- line="27"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;years_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-pt/plurals.xml"
- line="27"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;hours_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-es/plurals.xml"
- line="31"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
- errorLine1=" &lt;plurals name=&quot;hours_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-fr/plurals.xml"
- line="31"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;hours_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-it/plurals.xml"
- line="31"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;hours_ago&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-pt/plurals.xml"
- line="31"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_days&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-es/plurals.xml"
- line="35"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
- errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_days&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-fr/plurals.xml"
- line="35"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_days&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-it/plurals.xml"
- line="35"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_days&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-pt/plurals.xml"
- line="35"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;es&quot; (Spanish) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_hours&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-es/plurals.xml"
- line="39"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;fr&quot; (French) the following quantity should also be defined: `many` (e.g. &quot;1000000 de jours&quot;)"
- errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_hours&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-fr/plurals.xml"
- line="39"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;it&quot; (Italian) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_hours&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-it/plurals.xml"
- line="39"
- column="5"/>
- </issue>
-
- <issue
- id="MissingQuantity"
- message="For locale &quot;pt&quot; (Portuguese) the following quantity should also be defined: `many`"
- errorLine1=" &lt;plurals name=&quot;account_credit_expires_in_hours&quot;>"
- errorLine2=" ^">
- <location
- file="src/main/res/values-pt/plurals.xml"
- line="39"
- column="5"/>
- </issue>
-
- <issue
id="ImpliedQuantity"
message="The quantity `&apos;one&apos;` matches more than one specific number in this locale (0, 1), but the message did not \&#xA;include a formatting argument (such as `%d`). This is usually an internationalization error. See full issue \&#xA;explanation for more."
errorLine1=" &lt;item quantity=&quot;one&quot;>1 jour restant&lt;/item>"
@@ -671,23 +231,11 @@
<issue
id="VectorPath"
message="Very long vector path (917 characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector."
- errorLine1=" &lt;path android:fillColor=&quot;#66294D73&quot;"
- errorLine2=" ~~~~~~~~~">
- <location
- file="src/main/res/drawable/account_history_remove_normal.xml"
- line="7"
- column="30"/>
- </issue>
-
- <issue
- id="VectorPath"
- message="Very long vector path (917 characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector."
errorLine1=" &lt;path android:fillColor=&quot;#FF294D73&quot;"
errorLine2=" ~~~~~~~~~">
<location
file="src/main/res/drawable/account_history_remove_pressed.xml"
- line="7"
- column="30"/>
+ line="8"/>
</issue>
<issue
diff --git a/android/lib/resource/src/main/res/color/switch_thumb_fill_selector.xml b/android/lib/resource/src/main/res/color/switch_thumb_fill_selector.xml
deleted file mode 100644
index b294ee1038..0000000000
--- a/android/lib/resource/src/main/res/color/switch_thumb_fill_selector.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector
- xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:color="@color/switch_thumb_fill_checked"
- android:state_checked="true" />
- <item android:color="@color/switch_thumb_fill_unchecked"/>
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/account_history_entry_background.xml b/android/lib/resource/src/main/res/drawable/account_history_entry_background.xml
deleted file mode 100644
index ea25d2b72a..0000000000
--- a/android/lib/resource/src/main/res/drawable/account_history_entry_background.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <item android:state_pressed="false"
- android:state_focused="false">
- <shape android:shape="rectangle">
- <solid android:color="@color/white60" />
- </shape>
- </item>
- <item android:state_pressed="true">
- <shape android:shape="rectangle">
- <solid android:color="@color/white40" />
- </shape>
- </item>
- <item android:state_focused="true">
- <shape android:shape="rectangle">
- <solid android:color="@color/white40" />
- </shape>
- </item>
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/account_history_remove.xml b/android/lib/resource/src/main/res/drawable/account_history_remove.xml
deleted file mode 100644
index 6c7f52fcba..0000000000
--- a/android/lib/resource/src/main/res/drawable/account_history_remove.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <item android:state_pressed="false"
- android:drawable="@drawable/account_history_remove_normal" />
- <item android:state_pressed="true"
- android:drawable="@drawable/account_history_remove_pressed" />
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/account_history_remove_normal.xml b/android/lib/resource/src/main/res/drawable/account_history_remove_normal.xml
deleted file mode 100644
index 532d6cd9d7..0000000000
--- a/android/lib/resource/src/main/res/drawable/account_history_remove_normal.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="16dp"
- android:height="16dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
- <path android:fillColor="#66294D73"
- android:pathData="
- M 12,24
- C 5.37312,24 0,18.62688 0,12
- C 0,5.37312 5.37312,0 12,0
- C 18.62688,0 24,5.37312 24,12
- C 24,18.62688 18.62688,24 12,24
- Z
- M 13.5,12
- L 17.2947612,8.20523878
- C 17.6857559,7.81424414 17.6838785,7.18387854 17.293923,6.79392296
- L 17.206077,6.70607704
- C 16.8181114,6.31811142 16.1842538,6.31574616 15.7947612,6.70523878
- L 12,10.5
- L 8.20523878,6.70523878
- C 7.81574616,6.31574616 7.18188858,6.31811142 6.79392296,6.70607704
- L 6.70607704,6.79392296
- C 6.31612146,7.18387854 6.31424414,7.81424414 6.70523878,8.20523878
- L 10.5,12
- L 6.70523878,15.7947612
- C 6.31424414,16.1857559 6.31612146,16.8161215 6.70607704,17.206077
- L 6.79392296,17.293923
- C 7.18188858,17.6818886 7.81574616,17.6842538 8.20523878,17.2947612
- L 12,13.5
- L 15.7947612,17.2947612
- C 16.1842538,17.6842538 16.8181114,17.6818886 17.206077,17.293923
- L 17.293923,17.206077
- C 17.6838785,16.8161215 17.6857559,16.1857559 17.2947612,15.7947612
- L 13.5,12
- L13.5,12
- Z" />
-</vector>
diff --git a/android/lib/resource/src/main/res/drawable/account_input_background.xml b/android/lib/resource/src/main/res/drawable/account_input_background.xml
deleted file mode 100644
index d31775f404..0000000000
--- a/android/lib/resource/src/main/res/drawable/account_input_background.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <item android:state_enabled="false">
- <shape android:shape="rectangle">
- <solid android:color="@color/white20" />
- </shape>
- </item>
- <item android:state_enabled="true">
- <shape android:shape="rectangle">
- <solid android:color="@color/white" />
- </shape>
- </item>
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/account_login_border.xml b/android/lib/resource/src/main/res/drawable/account_login_border.xml
deleted file mode 100644
index 7aa3362f35..0000000000
--- a/android/lib/resource/src/main/res/drawable/account_login_border.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <solid android:color="@color/blue" />
-</shape>
diff --git a/android/lib/resource/src/main/res/drawable/account_login_border_error.xml b/android/lib/resource/src/main/res/drawable/account_login_border_error.xml
deleted file mode 100644
index 7b0b225c85..0000000000
--- a/android/lib/resource/src/main/res/drawable/account_login_border_error.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <solid android:color="@color/red" />
-</shape>
diff --git a/android/lib/resource/src/main/res/drawable/account_login_border_focused.xml b/android/lib/resource/src/main/res/drawable/account_login_border_focused.xml
deleted file mode 100644
index fa32039e1d..0000000000
--- a/android/lib/resource/src/main/res/drawable/account_login_border_focused.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <solid android:color="@color/darkBlue" />
-</shape>
diff --git a/android/lib/resource/src/main/res/drawable/account_login_corner.xml b/android/lib/resource/src/main/res/drawable/account_login_corner.xml
deleted file mode 100644
index e4640e498d..0000000000
--- a/android/lib/resource/src/main/res/drawable/account_login_corner.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="@dimen/account_login_corner_radius"
- android:height="@dimen/account_login_corner_radius"
- android:viewportWidth="4.0"
- android:viewportHeight="4.0">
- <path android:fillColor="@color/blue"
- android:pathData="M 0 4 H 2 A 2 2 0 0 1 4 2 V 0 H 0 Z" />
-</vector>
diff --git a/android/lib/resource/src/main/res/drawable/account_login_corner_error.xml b/android/lib/resource/src/main/res/drawable/account_login_corner_error.xml
deleted file mode 100644
index c19e1be609..0000000000
--- a/android/lib/resource/src/main/res/drawable/account_login_corner_error.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="@dimen/account_login_corner_radius"
- android:height="@dimen/account_login_corner_radius"
- android:viewportWidth="4.0"
- android:viewportHeight="4.0">
- <path android:fillColor="@color/blue"
- android:pathData="M 0 4 H 1 A 3 3 0 0 1 4 1 V 0 H 0 Z" />
- <path android:fillColor="@color/red"
- android:pathData="M 0 4 A 4 4 0 0 1 4 0 V 2 A 2 2 0 0 0 2 4 Z" />
-</vector>
diff --git a/android/lib/resource/src/main/res/drawable/account_login_corner_focused.xml b/android/lib/resource/src/main/res/drawable/account_login_corner_focused.xml
deleted file mode 100644
index a02110b51d..0000000000
--- a/android/lib/resource/src/main/res/drawable/account_login_corner_focused.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="@dimen/account_login_corner_radius"
- android:height="@dimen/account_login_corner_radius"
- android:viewportWidth="4.0"
- android:viewportHeight="4.0">
- <path android:fillColor="@color/blue"
- android:pathData="M 0 4 H 1 A 3 3 0 0 1 4 1 V 0 H 0 Z" />
- <path android:fillColor="@color/darkBlue"
- android:pathData="M 0 4 A 4 4 0 0 1 4 0 V 2 A 2 2 0 0 0 2 4 Z" />
-</vector>
diff --git a/android/lib/resource/src/main/res/drawable/app_list_item_background.xml b/android/lib/resource/src/main/res/drawable/app_list_item_background.xml
deleted file mode 100644
index a55c1e6d01..0000000000
--- a/android/lib/resource/src/main/res/drawable/app_list_item_background.xml
+++ /dev/null
@@ -1,20 +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">
- <solid android:color="@color/blue40" />
- </shape>
- </item>
- <item android:state_pressed="false"
- android:state_focused="true">
- <shape android:shape="rectangle">
- <solid android:color="@color/blue80" />
- </shape>
- </item>
- <item android:state_pressed="true">
- <shape android:shape="rectangle">
- <solid android:color="@color/blue60" />
- </shape>
- </item>
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/blue_button_background.xml b/android/lib/resource/src/main/res/drawable/blue_button_background.xml
deleted file mode 100644
index e87b080bee..0000000000
--- a/android/lib/resource/src/main/res/drawable/blue_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/blue80" />
- </shape>
- </item>
- <item android:state_pressed="false"
- android:state_focused="true">
- <shape android:shape="rectangle">
- <corners android:radius="4dp" />
- <solid android:color="@color/blue40" />
- </shape>
- </item>
- <item android:state_pressed="true">
- <shape android:shape="rectangle">
- <corners android:radius="4dp" />
- <solid android:color="@color/blue60" />
- </shape>
- </item>
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/cell_button_background.xml b/android/lib/resource/src/main/res/drawable/cell_button_background.xml
deleted file mode 100644
index 857a8386e1..0000000000
--- a/android/lib/resource/src/main/res/drawable/cell_button_background.xml
+++ /dev/null
@@ -1,20 +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">
- <solid android:color="@color/blue" />
- </shape>
- </item>
- <item android:state_pressed="false"
- android:state_focused="true">
- <shape android:shape="rectangle">
- <solid android:color="@color/blue60" />
- </shape>
- </item>
- <item android:state_pressed="true">
- <shape android:shape="rectangle">
- <solid android:color="@color/blue80" />
- </shape>
- </item>
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/cell_switch_background.xml b/android/lib/resource/src/main/res/drawable/cell_switch_background.xml
deleted file mode 100644
index c7b44ce746..0000000000
--- a/android/lib/resource/src/main/res/drawable/cell_switch_background.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <item android:state_enabled="false">
- <shape android:shape="rectangle">
- <corners android:radius="@dimen/cell_switch_border_radius" />
- <stroke android:color="@color/white20"
- android:width="2dp" />
- <size android:width="@dimen/cell_switch_width"
- android:height="@dimen/cell_switch_height" />
- </shape>
- </item>
- <item android:state_enabled="true">
- <shape android:shape="rectangle">
- <corners android:radius="@dimen/cell_switch_border_radius" />
- <stroke android:color="@color/white"
- android:width="2dp" />
- <size android:width="@dimen/cell_switch_width"
- android:height="@dimen/cell_switch_height" />
- </shape>
- </item>
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/dialog_background.xml b/android/lib/resource/src/main/res/drawable/dialog_background.xml
deleted file mode 100644
index a552adc351..0000000000
--- a/android/lib/resource/src/main/res/drawable/dialog_background.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<inset xmlns:android="http://schemas.android.com/apk/res/android"
- android:insetTop="@dimen/dialog_margin"
- android:insetLeft="@dimen/dialog_margin"
- android:insetRight="@dimen/dialog_margin"
- android:insetBottom="@dimen/dialog_margin">
- <shape android:shape="rectangle">
- <corners android:radius="11dp" />
- <solid android:color="@color/darkBlue" />
- </shape>
-</inset>
diff --git a/android/lib/resource/src/main/res/drawable/edit_text_background.xml b/android/lib/resource/src/main/res/drawable/edit_text_background.xml
deleted file mode 100644
index 06252ac37c..0000000000
--- a/android/lib/resource/src/main/res/drawable/edit_text_background.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <item android:state_enabled="false">
- <inset android:insetTop="1dp"
- android:insetBottom="1dp"
- android:insetLeft="1dp"
- android:insetRight="1dp">
- <shape android:shape="rectangle">
- <corners android:radius="@dimen/edit_text_corner_radius" />
- <solid android:color="@color/white20" />
- </shape>
- </inset>
- </item>
- <item android:state_enabled="true">
- <inset android:insetTop="1dp"
- android:insetBottom="1dp"
- android:insetLeft="1dp">
- <shape android:shape="rectangle">
- <corners android:radius="@dimen/edit_text_corner_radius" />
- <solid android:color="@color/white" />
- </shape>
- </inset>
- </item>
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/green_button_background.xml b/android/lib/resource/src/main/res/drawable/green_button_background.xml
deleted file mode 100644
index b2a50d5678..0000000000
--- a/android/lib/resource/src/main/res/drawable/green_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/green" />
- </shape>
- </item>
- <item android:state_pressed="false"
- android:state_focused="true">
- <shape android:shape="rectangle">
- <corners android:radius="4dp" />
- <solid android:color="@color/green80" />
- </shape>
- </item>
- <item android:state_pressed="true">
- <shape android:shape="rectangle">
- <corners android:radius="4dp" />
- <solid android:color="@color/green90" />
- </shape>
- </item>
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/icon_notification_error.xml b/android/lib/resource/src/main/res/drawable/icon_notification_error.xml
deleted file mode 100644
index 7574392129..0000000000
--- a/android/lib/resource/src/main/res/drawable/icon_notification_error.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="oval">
- <solid android:color="@color/red" />
- <size android:width="10dp"
- android:height="10dp" />
-</shape>
diff --git a/android/lib/resource/src/main/res/drawable/icon_notification_warning.xml b/android/lib/resource/src/main/res/drawable/icon_notification_warning.xml
deleted file mode 100644
index c6baa04c1c..0000000000
--- a/android/lib/resource/src/main/res/drawable/icon_notification_warning.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="oval">
- <solid android:color="@color/yellow" />
- <size android:width="10dp"
- android:height="10dp" />
-</shape>
diff --git a/android/lib/resource/src/main/res/drawable/input_text_background.xml b/android/lib/resource/src/main/res/drawable/input_text_background.xml
deleted file mode 100644
index d4b4b3c595..0000000000
--- a/android/lib/resource/src/main/res/drawable/input_text_background.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <corners android:radius="4dp" />
- <solid android:color="@color/white" />
-</shape>
diff --git a/android/lib/resource/src/main/res/drawable/login_button_arrow.xml b/android/lib/resource/src/main/res/drawable/login_button_arrow.xml
deleted file mode 100644
index 1909b78fe7..0000000000
--- a/android/lib/resource/src/main/res/drawable/login_button_arrow.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <item android:state_enabled="false"
- android:drawable="@drawable/icon_arrow_blue20" />
- <item android:state_enabled="true"
- android:drawable="@drawable/icon_arrow_white" />
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/login_button_background.xml b/android/lib/resource/src/main/res/drawable/login_button_background.xml
deleted file mode 100644
index c1041ef523..0000000000
--- a/android/lib/resource/src/main/res/drawable/login_button_background.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <item android:state_enabled="false">
- <shape android:shape="rectangle">
- <solid android:color="@color/white" />
- </shape>
- </item>
- <item android:state_enabled="true">
- <shape android:shape="rectangle">
- <solid android:color="@color/green" />
- </shape>
- </item>
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/red_button_background.xml b/android/lib/resource/src/main/res/drawable/red_button_background.xml
deleted file mode 100644
index e41121638f..0000000000
--- a/android/lib/resource/src/main/res/drawable/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/red" />
- </shape>
- </item>
- <item android:state_pressed="false"
- android:state_focused="true">
- <shape android:shape="rectangle">
- <corners android:radius="4dp" />
- <solid android:color="@color/red80" />
- </shape>
- </item>
- <item android:state_pressed="true">
- <shape android:shape="rectangle">
- <corners android:radius="4dp" />
- <solid android:color="@color/red95" />
- </shape>
- </item>
-</selector>
diff --git a/android/lib/resource/src/main/res/drawable/switch_thumb.xml b/android/lib/resource/src/main/res/drawable/switch_thumb.xml
deleted file mode 100644
index 1b32766d34..0000000000
--- a/android/lib/resource/src/main/res/drawable/switch_thumb.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:dither="true"
- android:shape="oval"
- android:useLevel="false"
- android:visible="true">
- <size android:width="@dimen/switch_thumb_size"
- android:height="@dimen/switch_thumb_size" />
- <padding android:bottom="@dimen/switch_thumb_padding"
- android:left="@dimen/switch_thumb_padding"
- android:right="@dimen/switch_thumb_padding"
- android:top="@dimen/switch_thumb_padding" />
- <solid android:color="@color/switch_thumb_fill" />
- <stroke android:width="@dimen/switch_thumb_padding"
- android:color="@color/switch_thumb_border" />
-</shape>
diff --git a/android/lib/resource/src/main/res/drawable/switch_track.xml b/android/lib/resource/src/main/res/drawable/switch_track.xml
deleted file mode 100644
index eb287d3316..0000000000
--- a/android/lib/resource/src/main/res/drawable/switch_track.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:dither="true"
- android:shape="rectangle"
- android:useLevel="false"
- android:visible="true">
- <size android:width="@dimen/switch_width"
- android:height="@dimen/switch_height" />
- <padding android:bottom="@dimen/switch_thumb_padding"
- android:left="@dimen/switch_thumb_padding"
- android:right="@dimen/switch_thumb_padding"
- android:top="@dimen/switch_thumb_padding" />
- <solid android:color="@color/switch_track_fill" />
- <stroke android:width="@dimen/switch_track_stroke"
- android:color="@color/switch_track_border" />
- <corners android:radius="@dimen/switch_track_radius" />
-</shape>
diff --git a/android/lib/resource/src/main/res/drawable/text_input_cursor.xml b/android/lib/resource/src/main/res/drawable/text_input_cursor.xml
deleted file mode 100644
index 56b2895c88..0000000000
--- a/android/lib/resource/src/main/res/drawable/text_input_cursor.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
- <solid android:color="@color/darkBlue" />
- <size android:width="2sp"
- android:height="24sp" />
-</shape>
diff --git a/android/lib/resource/src/main/res/values/attrs.xml b/android/lib/resource/src/main/res/values/attrs.xml
deleted file mode 100644
index c7e29bd8b6..0000000000
--- a/android/lib/resource/src/main/res/values/attrs.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<resources>
- <declare-styleable name="Button">
- <attr name="buttonColor" format="enum">
- <enum name="blue" value="0" />
- <enum name="green" value="1" />
- <enum name="red" value="2" />
- </attr>
- <attr name="detailImage" format="reference" />
- <attr name="showSpinner" format="boolean" />
- </declare-styleable>
- <declare-styleable name="Cell">
- <attr name="footer" format="reference|string" />
- </declare-styleable>
- <declare-styleable name="CopyableInformationView">
- <attr name="clipboardLabel" format="reference|string" />
- <attr name="copiedToast" format="reference|string" />
- </declare-styleable>
- <declare-styleable name="InformationView">
- <attr name="description" format="reference|string" />
- <attr name="errorColor" format="reference|color" />
- <attr name="informationColor" format="reference|color" />
- <attr name="maxLength" format="integer" />
- <attr name="whenMissing" format="enum">
- <enum name="nothing" value="0" />
- <enum name="hide" value="1" />
- <enum name="showSpinner" value="2" />
- </attr>
- </declare-styleable>
- <declare-styleable name="TextAttribute">
- <attr name="text" format="reference|string" />
- </declare-styleable>
- <declare-styleable name="Url">
- <attr name="url" format="reference|string" />
- </declare-styleable>
- <declare-styleable name="UrlButton">
- <attr name="withToken" format="boolean" />
- </declare-styleable>
- <attr name="actionListItemViewStyle" type="reference" />
- <attr name="applicationListItemViewStyle" type="reference" />
-</resources>
diff --git a/android/lib/resource/src/main/res/values/colors.xml b/android/lib/resource/src/main/res/values/colors.xml
index 1bcfd3d010..7ce616c7c0 100644
--- a/android/lib/resource/src/main/res/values/colors.xml
+++ b/android/lib/resource/src/main/res/values/colors.xml
@@ -1,30 +1,6 @@
<resources>
<color name="colorPrimary">#294D73</color>
<color name="blue">#294D73</color>
- <color name="blue80">#CC294D73</color>
- <color name="blue60">#99294D73</color>
- <color name="blue40">#66294D73</color>
- <color name="blue20">#33294D73</color>
<color name="darkBlue">#192E45</color>
- <color name="white">#FFFFFF</color>
- <color name="white80">#CCFFFFFF</color>
- <color name="white60">#99FFFFFF</color>
- <color name="white40">#66FFFFFF</color>
- <color name="white20">#33FFFFFF</color>
- <color name="green">#44AD4D</color>
- <color name="green90">#E644AD4D</color>
- <color name="green80">#CC44AD4D</color>
- <color name="red">#FFE34039</color>
- <color name="red95">#F2E34039</color>
- <color name="red80">#CCE34039</color>
- <color name="red60">#99E34039</color>
- <color name="yellow">#FFD323</color>
<color name="icon_background">@color/darkBlue</color>
- <!-- Switch Colors -->
- <color name="switch_thumb_fill_checked">@color/green</color>
- <color name="switch_thumb_fill_unchecked">@color/red</color>
- <color name="switch_thumb_fill">@color/switch_thumb_fill_selector</color>
- <color name="switch_thumb_border">@android:color/transparent</color>
- <color name="switch_track_fill">@android:color/transparent</color>
- <color name="switch_track_border">@color/white80</color>
</resources>
diff --git a/android/lib/resource/src/main/res/values/dimensions.xml b/android/lib/resource/src/main/res/values/dimensions.xml
index b4e09ab70a..ca17e071b7 100644
--- a/android/lib/resource/src/main/res/values/dimensions.xml
+++ b/android/lib/resource/src/main/res/values/dimensions.xml
@@ -1,51 +1,4 @@
<resources>
- <dimen name="dialog_margin">14dp</dimen>
- <dimen name="account_login_input_height">48dp</dimen>
- <dimen name="account_login_corner_radius">4dp</dimen>
- <dimen name="account_login_border_width">2dp</dimen>
- <dimen name="account_history_divider">1dp</dimen>
- <dimen name="account_history_entry_height">48dp</dimen>
- <dimen name="edit_text_corner_radius">4dp</dimen>
- <dimen name="button_height">44dp</dimen>
- <dimen name="cell_height">52dp</dimen>
- <dimen name="cell_switch_border_radius">16dp</dimen>
- <dimen name="cell_switch_width">48dp</dimen>
- <dimen name="cell_switch_height">30dp</dimen>
- <dimen name="cell_switch_knob_margin">4dp</dimen>
- <dimen name="cell_switch_knob_max_translation">18dp</dimen>
- <dimen name="cell_switch_knob_size">22dp</dimen>
- <dimen name="settings_back_button_padding">12dp</dimen>
- <dimen name="cell_left_padding">@dimen/side_margin</dimen>
- <dimen name="cell_right_padding">16dp</dimen>
- <dimen name="cell_inner_spacing">8dp</dimen>
- <dimen name="cell_label_vertical_padding">14dp</dimen>
- <dimen name="cell_footer_top_padding">6dp</dimen>
- <dimen name="cell_footer_horizontal_padding">@dimen/side_margin</dimen>
- <dimen name="text_small">13sp</dimen>
- <dimen name="text_medium">16sp</dimen>
<dimen name="text_medium_plus">18sp</dimen>
- <dimen name="text_big">24sp</dimen>
- <dimen name="text_huge">30sp</dimen>
- <dimen name="side_margin">22dp</dimen>
- <dimen name="vertical_space">20dp</dimen>
- <dimen name="half_vertical_space">10dp</dimen>
- <dimen name="button_separation">18dp</dimen>
- <dimen name="screen_vertical_margin">22dp</dimen>
- <dimen name="progress_size">60dp</dimen>
- <dimen name="icon_size">24dp</dimen>
- <dimen name="widget_padding">16dp</dimen>
- <dimen name="expanded_toolbar_height">104dp</dimen>
- <dimen name="information_icon_size">28dp</dimen>
- <dimen name="information_action_margin">20dp</dimen>
- <dimen name="medium_padding">16dp</dimen>
- <dimen name="small_padding">8dp</dimen>
<dimen name="zero_size">0px</dimen>
- <!-- Switch Dimens-->
- <dimen name="switch_width">46dp</dimen>
- <dimen name="switch_height">30dp</dimen>
- <dimen name="switch_thumb_size">30dp</dimen>
- <dimen name="switch_thumb_padding">8dp</dimen>
- <dimen name="switch_track_radius">16dp</dimen>
- <dimen name="switch_track_stroke">2dp</dimen>
- <dimen name="top_bar_height">64dp</dimen>
</resources>
diff --git a/android/lib/resource/src/main/res/values/styles.xml b/android/lib/resource/src/main/res/values/styles.xml
index e03dd86700..69ee118cac 100644
--- a/android/lib/resource/src/main/res/values/styles.xml
+++ b/android/lib/resource/src/main/res/values/styles.xml
@@ -4,92 +4,7 @@
<item name="android:navigationBarColor">@color/blue</item>
<item name="android:statusBarColor">@color/blue</item>
<item name="android:windowBackground">@color/blue</item>
- <item name="switchStyle">@style/AppTheme.Switch</item>
- <item name="actionListItemViewStyle">@style/ListItem.Action</item>
- <item name="applicationListItemViewStyle">@style/ListItem.Action.Application</item>
<item name="android:spotShadowAlpha">0</item>
<item name="actionBarSize">48dp</item>
</style>
- <style name="InputText" parent="Widget.AppCompat.EditText">
- <item name="android:padding">14dp</item>
- <item name="android:background">@drawable/input_text_background</item>
- <item name="android:textCursorDrawable">@drawable/text_input_cursor</item>
- <item name="android:textColorHint">@color/blue40</item>
- <item name="android:textColor">@color/blue</item>
- <item name="android:textSize">@dimen/text_small</item>
- </style>
- <style name="Button" parent="Widget.AppCompat.Button.Borderless">
- <item name="android:layout_height">wrap_content</item>
- <item name="android:layout_width">match_parent</item>
- <item name="android:minHeight">@dimen/button_height</item>
- <item name="android:paddingTop">0dp</item>
- <item name="android:paddingBottom">0dp</item>
- <item name="android:textAllCaps">false</item>
- <item name="android:textColor">@color/white</item>
- <item name="android:textSize">@dimen/text_medium_plus</item>
- <item name="android:textStyle">bold</item>
- </style>
- <style name="GreenButton" parent="Button">
- <item name="android:background">@drawable/green_button_background</item>
- </style>
- <style name="RedButton" parent="Button">
- <item name="android:background">@drawable/red_button_background</item>
- </style>
- <style name="BlueButton" parent="Button">
- <item name="android:background">@drawable/blue_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">@dimen/text_huge</item>
- </style>
- <style name="SettingsCollapsedHeader" parent="SettingsHeader">
- <item name="android:textSize">@dimen/text_medium</item>
- </style>
- <style name="TextAppearance.Mullvad" parent="TextAppearance.AppCompat" />
- <style name="TextAppearance.Mullvad.Title1">
- <item name="android:textColor">@color/white</item>
- <item name="android:textSize">@dimen/text_medium_plus</item>
- </style>
- <style name="TextAppearance.Mullvad.Small">
- <item name="android:textColor">@color/white60</item>
- <item name="android:textSize">@dimen/text_small</item>
- </style>
- <style name="ListItem">
- <item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">wrap_content</item>
- </style>
- <style name="ListItem.DividerGroup">
- <item name="android:layout_height">@dimen/vertical_space</item>
- </style>
- <style name="ListItem.PlainText">
- <item name="android:focusable">false</item>
- <item name="android:clickable">false</item>
- <item name="android:paddingTop">5dp</item>
- </style>
- <style name="ListItem.Action">
- <item name="android:height">@dimen/cell_height</item>
- <item name="android:layout_height">@dimen/cell_height</item>
- <item name="android:background">@drawable/cell_button_background</item>
- <item name="android:clickable">true</item>
- <item name="android:focusable">true</item>
- </style>
- <style name="ListItem.Action.Application">
- <item name="android:background">@drawable/app_list_item_background</item>
- </style>
- <style name="ListItem.Action.Double">
- <item name="android:clickable">false</item>
- <item name="android:focusable">false</item>
- </style>
- <!-- Switch Style -->
- <style name="AppTheme.Switch">
- <item name="android:layout_width">@dimen/switch_width</item>
- <item name="android:layout_height">@dimen/switch_height</item>
- <item name="track">@drawable/switch_track</item>
- <item name="android:thumb">@drawable/switch_thumb</item>
- <item name="switchMinWidth">@dimen/switch_width</item>
- <item name="showText">false</item>
- </style>
</resources>