From 2f2fb535c9c750151033eced70ffb48e9ee1ca88 Mon Sep 17 00:00:00 2001 From: X1nto Date: Wed, 13 May 2020 22:31:13 +0400 Subject: [PATCH] moved everything to styles --- .../manager/ui/fragments/SettingsFragment.kt | 4 +- .../main/res/drawable/ic_microg_settings.xml | 10 ++ .../fragment_vanced_language_selection.xml | 28 +--- .../fragment_vanced_theme_selection.xml | 28 +--- .../fragment_vanced_variant_selection.xml | 28 +--- .../res/layout/include_about_app_devs.xml | 21 +-- .../main/res/layout/include_about_sources.xml | 48 ++----- .../res/layout/include_about_vanced_devs.xml | 23 +--- .../main/res/layout/include_changelogs.xml | 18 +-- app/src/main/res/layout/include_microg.xml | 100 +++++---------- .../main/res/layout/include_network_error.xml | 9 +- .../main/res/layout/include_useful_links.xml | 37 +----- app/src/main/res/layout/include_vanced.xml | 72 ++--------- .../main/res/layout/include_vanced_medias.xml | 45 +------ app/src/main/res/values/styles.xml | 121 +++++++++++++++++- 15 files changed, 227 insertions(+), 365 deletions(-) create mode 100644 app/src/main/res/drawable/ic_microg_settings.xml diff --git a/app/src/main/java/com/vanced/manager/ui/fragments/SettingsFragment.kt b/app/src/main/java/com/vanced/manager/ui/fragments/SettingsFragment.kt index 1d0e86e1..08011ab6 100644 --- a/app/src/main/java/com/vanced/manager/ui/fragments/SettingsFragment.kt +++ b/app/src/main/java/com/vanced/manager/ui/fragments/SettingsFragment.kt @@ -16,11 +16,11 @@ class SettingsFragment : PreferenceFragmentCompat() { //Fuck Android 6 android 5 users! Because theme is not working //we can't display preference for them. //They should've upgraded to something newer - if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) { + /*if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) { val prefScreen: PreferenceScreen? = findPreference("prefScreen") val prefCategory: PreferenceCategory? = findPreference("interface_category") prefScreen?.removePreference(prefCategory) - } + }*/ activity?.title = getString(R.string.title_settings) setHasOptionsMenu(true) diff --git a/app/src/main/res/drawable/ic_microg_settings.xml b/app/src/main/res/drawable/ic_microg_settings.xml new file mode 100644 index 00000000..d4851e31 --- /dev/null +++ b/app/src/main/res/drawable/ic_microg_settings.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout/fragment_vanced_language_selection.xml b/app/src/main/res/layout/fragment_vanced_language_selection.xml index bfb58526..03b51e5b 100644 --- a/app/src/main/res/layout/fragment_vanced_language_selection.xml +++ b/app/src/main/res/layout/fragment_vanced_language_selection.xml @@ -6,16 +6,7 @@ android:layout_height="match_parent"> + app:icon="@drawable/ic_done_black_24dp" /> diff --git a/app/src/main/res/layout/fragment_vanced_theme_selection.xml b/app/src/main/res/layout/fragment_vanced_theme_selection.xml index 2eef62de..0a34291f 100644 --- a/app/src/main/res/layout/fragment_vanced_theme_selection.xml +++ b/app/src/main/res/layout/fragment_vanced_theme_selection.xml @@ -6,16 +6,7 @@ android:layout_height="match_parent"> + app:icon="@drawable/ic_keyboard_next" /> diff --git a/app/src/main/res/layout/fragment_vanced_variant_selection.xml b/app/src/main/res/layout/fragment_vanced_variant_selection.xml index 13450bdb..742c1f4d 100644 --- a/app/src/main/res/layout/fragment_vanced_variant_selection.xml +++ b/app/src/main/res/layout/fragment_vanced_variant_selection.xml @@ -6,16 +6,7 @@ android:layout_height="match_parent"> + app:icon="@drawable/ic_keyboard_next" /> diff --git a/app/src/main/res/layout/include_about_app_devs.xml b/app/src/main/res/layout/include_about_app_devs.xml index a7c8f75e..b8b20a82 100644 --- a/app/src/main/res/layout/include_about_app_devs.xml +++ b/app/src/main/res/layout/include_about_app_devs.xml @@ -3,15 +3,8 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" - android:layout_width="match_parent" - android:layout_height="wrap_content" - app:cardCornerRadius="8dp" - app:cardPreventCornerOverlap="true" - app:cardBackgroundColor="?colorSurfaceVariant" - app:cardElevation="0dp" - app:contentPaddingRight="8dp" - app:contentPaddingLeft="8dp" - app:contentPaddingBottom="8dp" + style="@style/MaterialCard" + app:contentPaddingTop="2dp" tools:ignore="HardcodedText"> + app:layout_constraintStart_toStartOf="parent" /> - + android:layout_height="match_parent" + android:orientation="vertical"> @@ -51,33 +37,21 @@ + app:icon="@drawable/github" /> - + diff --git a/app/src/main/res/layout/include_about_vanced_devs.xml b/app/src/main/res/layout/include_about_vanced_devs.xml index 99acadc6..245b461d 100644 --- a/app/src/main/res/layout/include_about_vanced_devs.xml +++ b/app/src/main/res/layout/include_about_vanced_devs.xml @@ -3,33 +3,20 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" - android:layout_width="match_parent" - android:layout_height="wrap_content" - app:cardCornerRadius="8dp" - app:cardPreventCornerOverlap="true" - app:cardBackgroundColor="?colorSurfaceVariant" - app:cardElevation="0dp" - app:contentPaddingRight="8dp" - app:contentPaddingLeft="8dp" - app:contentPaddingBottom="8dp" - tools:ignore="HardcodedText"> + style="@style/MaterialCard" + tools:ignore="HardcodedText" + app:contentPaddingTop="2dp"> + app:layout_constraintStart_toStartOf="parent" /> + app:contentPaddingTop="2dp"> + android:text="@string/changelogs" /> + style="@style/MaterialCard"> + android:layout_height="match_parent"> - + app:layout_constraintBottom_toTopOf="@id/microg_title_buttons_barrier" /> -