mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 21:37:39 +00:00
Added themes
All files (that used styles) were refactored to use styles directly so themes can only actually adjust colors - Elaborate themes would be super hard to maintain and would certainly break over time
This commit is contained in:
parent
42606162b2
commit
cc7e47bbb6
@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.topjohnwu.magisk">
|
||||
|
@ -13,6 +13,7 @@ import com.topjohnwu.magisk.di.Protected
|
||||
import com.topjohnwu.magisk.extensions.get
|
||||
import com.topjohnwu.magisk.extensions.inject
|
||||
import com.topjohnwu.magisk.model.preference.PreferenceModel
|
||||
import com.topjohnwu.magisk.redesign.theme.Theme
|
||||
import com.topjohnwu.magisk.utils.BiometricHelper
|
||||
import com.topjohnwu.magisk.utils.Utils
|
||||
import com.topjohnwu.superuser.Shell
|
||||
@ -52,6 +53,7 @@ object Config : PreferenceModel, DBConfig {
|
||||
const val DOWNLOAD_PATH = "download_path"
|
||||
const val REDESIGN = "redesign"
|
||||
const val SAFETY = "safety_notice"
|
||||
const val THEME_ORDINAL = "theme_ordinal"
|
||||
|
||||
// system state
|
||||
const val MAGISKHIDE = "magiskhide"
|
||||
@ -125,6 +127,7 @@ object Config : PreferenceModel, DBConfig {
|
||||
Key.DARK_THEME_EXTENDED,
|
||||
AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
|
||||
)
|
||||
var themeOrdinal by preference(Key.THEME_ORDINAL, Theme.Piplup.ordinal)
|
||||
var suReAuth by preference(Key.SU_REAUTH, false)
|
||||
var checkUpdate by preference(Key.CHECK_UPDATES, true)
|
||||
var magiskHide by preference(Key.MAGISKHIDE, true)
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.topjohnwu.magisk.model.entity.recycler
|
||||
|
||||
import com.topjohnwu.magisk.R
|
||||
import com.topjohnwu.magisk.databinding.ComparableRvItem
|
||||
import com.topjohnwu.magisk.redesign.theme.Theme
|
||||
|
||||
class ThemeItem(val theme: Theme) : ComparableRvItem<ThemeItem>() {
|
||||
|
||||
override val layoutRes = R.layout.item_theme
|
||||
|
||||
override fun contentSameAs(other: ThemeItem) = itemSameAs(other)
|
||||
override fun itemSameAs(other: ThemeItem) = theme == other.theme
|
||||
|
||||
}
|
@ -8,6 +8,7 @@ import com.topjohnwu.magisk.Const
|
||||
import com.topjohnwu.magisk.intent
|
||||
import com.topjohnwu.magisk.redesign.install.InstallFragment
|
||||
import com.topjohnwu.magisk.redesign.safetynet.SafetynetFragment
|
||||
import com.topjohnwu.magisk.redesign.theme.ThemeFragment
|
||||
import com.topjohnwu.magisk.ui.MainActivity
|
||||
import com.topjohnwu.magisk.ui.hide.MagiskHideFragment
|
||||
import com.topjohnwu.magisk.ui.home.HomeFragment
|
||||
@ -98,6 +99,10 @@ object Navigation {
|
||||
navDirections { destination = InstallFragment::class }
|
||||
}
|
||||
|
||||
fun theme() = MagiskNavigationEvent {
|
||||
navDirections { destination = ThemeFragment::class }
|
||||
}
|
||||
|
||||
fun fromSection(section: String) = when (section) {
|
||||
"superuser" -> superuser()
|
||||
"modules" -> modules()
|
||||
|
@ -10,7 +10,6 @@ import androidx.core.content.getSystemService
|
||||
import androidx.databinding.OnRebindCallback
|
||||
import androidx.databinding.ViewDataBinding
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.topjohnwu.magisk.R
|
||||
import com.topjohnwu.magisk.base.BaseActivity
|
||||
import com.topjohnwu.magisk.extensions.snackbar
|
||||
import com.topjohnwu.magisk.extensions.startAnimations
|
||||
@ -18,13 +17,14 @@ import com.topjohnwu.magisk.model.events.SnackbarEvent
|
||||
import com.topjohnwu.magisk.model.events.ViewEvent
|
||||
import com.topjohnwu.magisk.model.navigation.MagiskNavigationEvent
|
||||
import com.topjohnwu.magisk.model.navigation.Navigator
|
||||
import com.topjohnwu.magisk.redesign.theme.Theme
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
|
||||
abstract class CompatActivity<ViewModel : CompatViewModel, Binding : ViewDataBinding> :
|
||||
BaseActivity<ViewModel, Binding>(), CompatView<ViewModel>, Navigator {
|
||||
|
||||
override val themeRes = R.style.Foundation_Default
|
||||
override val themeRes = Theme.selected.themeRes
|
||||
override val viewRoot: View get() = binding.root
|
||||
override val navigation: CompatNavigationDelegate<CompatActivity<ViewModel, Binding>>? by lazy {
|
||||
CompatNavigationDelegate(this)
|
||||
|
@ -4,7 +4,7 @@ import com.topjohnwu.magisk.Config
|
||||
import com.topjohnwu.magisk.extensions.addOnPropertyChangedCallback
|
||||
import com.topjohnwu.magisk.extensions.toggle
|
||||
import com.topjohnwu.magisk.model.events.DieEvent
|
||||
import com.topjohnwu.magisk.model.events.dialog.DarkThemeDialog
|
||||
import com.topjohnwu.magisk.model.navigation.Navigation
|
||||
import com.topjohnwu.magisk.redesign.compat.CompatViewModel
|
||||
import com.topjohnwu.magisk.utils.KObservableField
|
||||
|
||||
@ -21,6 +21,6 @@ class SettingsViewModel : CompatViewModel() {
|
||||
}
|
||||
|
||||
fun toggle(item: KObservableField<Boolean>) = item.toggle()
|
||||
fun darkModePressed() = DarkThemeDialog().publish()
|
||||
fun themePressed() = Navigation.theme().publish()
|
||||
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.topjohnwu.magisk.redesign.theme
|
||||
|
||||
import com.topjohnwu.magisk.Config
|
||||
import com.topjohnwu.magisk.R
|
||||
|
||||
enum class Theme(
|
||||
val themeName: String,
|
||||
val themeRes: Int
|
||||
) {
|
||||
|
||||
Piplup(
|
||||
themeName = "Piplup",
|
||||
themeRes = R.style.ThemeFoundationMD2_Piplup
|
||||
),
|
||||
PiplupAmoled(
|
||||
themeName = "AMOLED",
|
||||
themeRes = R.style.ThemeFoundationMD2_Amoled
|
||||
),
|
||||
Rayquaza(
|
||||
themeName = "Rayquaza",
|
||||
themeRes = R.style.ThemeFoundationMD2_Rayquaza
|
||||
),
|
||||
Zapdos(
|
||||
themeName = "Zapdos",
|
||||
themeRes = R.style.ThemeFoundationMD2_Zapdos
|
||||
),
|
||||
Charmeleon(
|
||||
themeName = "Charmeleon",
|
||||
themeRes = R.style.ThemeFoundationMD2_Charmeleon
|
||||
),
|
||||
Mew(
|
||||
themeName = "Mew",
|
||||
themeRes = R.style.ThemeFoundationMD2_Mew
|
||||
),
|
||||
Salamence(
|
||||
themeName = "Salamence",
|
||||
themeRes = R.style.ThemeFoundationMD2_Salamence
|
||||
);
|
||||
|
||||
val isSelected get() = Config.themeOrdinal == ordinal
|
||||
|
||||
fun select() {
|
||||
Config.themeOrdinal = ordinal
|
||||
}
|
||||
|
||||
companion object {
|
||||
val selected get() = values().getOrNull(Config.themeOrdinal) ?: Piplup
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.topjohnwu.magisk.redesign.theme
|
||||
|
||||
import android.graphics.Insets
|
||||
import com.topjohnwu.magisk.R
|
||||
import com.topjohnwu.magisk.databinding.FragmentThemeMd2Binding
|
||||
import com.topjohnwu.magisk.redesign.compat.CompatFragment
|
||||
@ -10,4 +11,12 @@ class ThemeFragment : CompatFragment<ThemeViewModel, FragmentThemeMd2Binding>()
|
||||
override val layoutRes = R.layout.fragment_theme_md2
|
||||
override val viewModel by viewModel<ThemeViewModel>()
|
||||
|
||||
override fun consumeSystemWindowInsets(insets: Insets) = insets
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
|
||||
activity.title = getString(R.string.section_theme)
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,23 @@
|
||||
package com.topjohnwu.magisk.redesign.theme
|
||||
|
||||
import com.topjohnwu.magisk.BR
|
||||
import com.topjohnwu.magisk.model.entity.recycler.ThemeItem
|
||||
import com.topjohnwu.magisk.model.events.RecreateEvent
|
||||
import com.topjohnwu.magisk.model.events.dialog.DarkThemeDialog
|
||||
import com.topjohnwu.magisk.redesign.compat.CompatViewModel
|
||||
import com.topjohnwu.magisk.redesign.home.itemBindingOf
|
||||
import com.topjohnwu.magisk.redesign.superuser.diffListOf
|
||||
|
||||
class ThemeViewModel : CompatViewModel()
|
||||
class ThemeViewModel : CompatViewModel() {
|
||||
|
||||
val items = diffListOf(*Theme.values().map { ThemeItem(it) }.toTypedArray())
|
||||
val itemBinding = itemBindingOf<ThemeItem> { it.bindExtra(BR.viewModel, this) }
|
||||
|
||||
fun saveTheme(theme: Theme) {
|
||||
theme.select()
|
||||
RecreateEvent().publish()
|
||||
}
|
||||
|
||||
fun darkModePressed() = DarkThemeDialog().publish()
|
||||
|
||||
}
|
@ -455,4 +455,9 @@ fun View.setRotationNotAnimated(rotation: Int) {
|
||||
@BindingAdapter("android:text")
|
||||
fun TextView.setTextSafe(text: Int) {
|
||||
if (text == 0) this.text = null else setText(text)
|
||||
}
|
||||
|
||||
@BindingAdapter("android:theme")
|
||||
fun View.setThemeCompat(theme: Int) {
|
||||
|
||||
}
|
8
app/src/main/res/drawable/bg_selection_circle_green.xml
Normal file
8
app/src/main/res/drawable/bg_selection_circle_green.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="#43A047" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
10
app/src/main/res/drawable/ic_paint.xml
Normal file
10
app/src/main/res/drawable/ic_paint.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="?colorOnSurface"
|
||||
android:pathData="M20.71,4.63L19.37,3.29C19,2.9 18.35,2.9 17.96,3.29L9,12.25L11.75,15L20.71,6.04C21.1,5.65 21.1,5 20.71,4.63M7,14A3,3 0 0,0 4,17C4,18.31 2.84,19 2,19C2.92,20.22 4.5,21 6,21A4,4 0 0,0 10,17A3,3 0 0,0 7,14Z" />
|
||||
</vector>
|
@ -27,14 +27,14 @@
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/main_toolbar_wrapper"
|
||||
style="?styleAppbar"
|
||||
style="@style/WidgetFoundation.Appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@{viewModel.insets.top}">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
android:id="@+id/main_toolbar"
|
||||
style="?styleToolbar"
|
||||
style="@style/WidgetFoundation.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_scrollFlags="noScroll"
|
||||
@ -45,7 +45,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/main_bottom_bar"
|
||||
style="?styleCardElevated"
|
||||
style="@style/WidgetFoundation.Card.Elevated"
|
||||
android:layout_width="192dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
@ -80,7 +80,7 @@
|
||||
android:gravity="center"
|
||||
android:paddingBottom="@dimen/l_50"
|
||||
android:text="@string/no_connection"
|
||||
android:textAppearance="?appearanceTextCaptionNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||
android:textColor="?colorError"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
@ -16,7 +16,7 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?styleCardElevated"
|
||||
style="@style/WidgetFoundation.Card.Elevated"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardElevation="@dimen/margin_generic"
|
||||
@ -56,7 +56,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="?styleIconPrimary"
|
||||
style="@style/WidgetFoundation.Icon.Primary"
|
||||
gone="@{data.icon == 0}"
|
||||
srcCompat="@{data.icon}"
|
||||
android:layout_gravity="center"
|
||||
@ -65,7 +65,7 @@
|
||||
tools:src="@drawable/ic_delete_md2" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="?styleImageBig"
|
||||
style="@style/WidgetFoundation.Image.Big"
|
||||
gone="@{data.iconRaw == null}"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
@ -81,7 +81,7 @@
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:gravity="center"
|
||||
android:text="@{data.title}"
|
||||
android:textAppearance="?appearanceTextTitleNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/dialog_base_start"
|
||||
app:layout_constraintRight_toRightOf="@+id/dialog_base_end"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dialog_base_icon"
|
||||
@ -111,7 +111,7 @@
|
||||
android:layout_marginTop="@dimen/l_50"
|
||||
android:gravity="center"
|
||||
android:text="@{data.message}"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
tools:lines="3"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
@ -154,7 +154,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/dialog_base_button_4"
|
||||
style="?styleButtonText"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{data.buttonIDGAF.icon == 0 && data.buttonIDGAF.title.length == 0}"
|
||||
isEnabled="@{data.buttonIDGAF.isEnabled()}"
|
||||
android:layout_width="wrap_content"
|
||||
@ -169,7 +169,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/dialog_base_button_2"
|
||||
style="?styleButtonText"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{data.buttonNeutral.icon == 0 && data.buttonNeutral.title.length == 0}"
|
||||
isEnabled="@{data.buttonNeutral.isEnabled()}"
|
||||
android:layout_width="wrap_content"
|
||||
@ -192,7 +192,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/dialog_base_button_3"
|
||||
style="?styleButtonText"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{data.buttonNegative.icon == 0 && data.buttonNegative.title.length == 0}"
|
||||
isEnabled="@{data.buttonNegative.isEnabled()}"
|
||||
android:layout_width="wrap_content"
|
||||
@ -207,7 +207,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/dialog_base_button_1"
|
||||
style="?styleButtonText"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{data.buttonPositive.icon == 0 && data.buttonPositive.title.length == 0}"
|
||||
isEnabled="@{data.buttonPositive.isEnabled()}"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -50,7 +50,7 @@
|
||||
|
||||
<com.google.android.material.circularreveal.cardview.CircularRevealCardView
|
||||
android:id="@+id/hide_filter"
|
||||
style="?styleCardVariant"
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
@ -78,11 +78,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/safetynet_attest_loading"
|
||||
android:textAppearance="?appearanceTextTitleNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ProgressBar
|
||||
style="?styleProgressIndeterminate"
|
||||
style="@style/WidgetFoundation.ProgressBar.Indeterminate"
|
||||
android:layout_marginTop="@dimen/l1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -45,7 +45,7 @@
|
||||
android:paddingTop="@dimen/l1">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?styleCardOnPrimary"
|
||||
style="@style/WidgetFoundation.Card.OnPrimary"
|
||||
goneUnless="@{viewModel.noticeVisible}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -63,14 +63,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="@dimen/l1"
|
||||
android:text="@string/home_notice_content"
|
||||
android:textAppearance="?appearanceTextCaptionOnPrimary"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.OnPrimary"
|
||||
app:layout_constraintEnd_toStartOf="@+id/home_notice_hide"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/home_notice_hide"
|
||||
style="?styleButtonTextOnPrimary"
|
||||
style="@style/WidgetFoundation.Button.Text.OnPrimary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{() -> viewModel.hideNotice()}"
|
||||
@ -91,7 +91,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/home_device_wrapper"
|
||||
style="?styleCardVariant"
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
@ -131,7 +131,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/home_device_icon"
|
||||
style="?styleIconPrimary"
|
||||
style="@style/WidgetFoundation.Icon.Primary"
|
||||
android:layout_marginStart="@dimen/l_50"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:layout_marginBottom="@dimen/l1"
|
||||
@ -151,7 +151,7 @@
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="@{Build.MANUFACTURER}"
|
||||
android:textAppearance="?appearanceTextTitleNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/home_device_product"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -166,7 +166,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{Build.DEVICE ?? Build.PRODUCT}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
app:layout_constraintBottom_toTopOf="@+id/home_device_board"
|
||||
app:layout_constraintEnd_toEndOf="@+id/home_device_title"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
@ -179,7 +179,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{Build.BOARD}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_device_icon"
|
||||
app:layout_constraintEnd_toEndOf="@+id/home_device_title"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
@ -291,7 +291,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/home_magisk_wrapper"
|
||||
style="?styleCardVariant"
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
isEnabled="@{Info.env.magiskVersionCode >= 0}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@ -326,7 +326,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/home_magisk_icon"
|
||||
style="?styleIconPrimary"
|
||||
style="@style/WidgetFoundation.Icon.Primary"
|
||||
isEnabled="@{viewModel.stateMagisk != MagiskState.LOADING}"
|
||||
onSelectClick="@{() -> viewModel.onDeletePressed()}"
|
||||
onSelectReset="@{7000L}"
|
||||
@ -344,7 +344,7 @@
|
||||
android:layout_marginStart="@dimen/l_50"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="@string/magisk"
|
||||
android:textAppearance="?appearanceTextTitleNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/home_magisk_status"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -468,7 +468,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
style="?styleProgressDeterminate"
|
||||
style="@style/WidgetFoundation.ProgressBar"
|
||||
gone="@{viewModel.stateMagiskProgress == 0 || viewModel.stateMagiskProgress == 100}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
@ -489,7 +489,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_magisk_wrapper">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="?styleButtonDefault"
|
||||
style="@style/WidgetFoundation.Button"
|
||||
gone="@{viewModel.stateMagisk != MagiskState.OBSOLETE}"
|
||||
isEnabled="@{viewModel.stateManager == MagiskState.UP_TO_DATE && (viewModel.stateMagiskProgress == 0 || viewModel.stateMagiskProgress == 100)}"
|
||||
android:layout_width="wrap_content"
|
||||
@ -503,7 +503,7 @@
|
||||
tools:visibility="gone" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="?styleButtonText"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{viewModel.stateMagisk == MagiskState.OBSOLETE}"
|
||||
isEnabled="@{viewModel.stateManager == MagiskState.UP_TO_DATE && (viewModel.stateMagiskProgress == 0 || viewModel.stateMagiskProgress == 100)}"
|
||||
android:layout_width="wrap_content"
|
||||
@ -519,7 +519,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/home_manager_wrapper"
|
||||
style="?styleCardVariant"
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
@ -553,7 +553,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/home_manager_icon"
|
||||
style="?styleIconPrimary"
|
||||
style="@style/WidgetFoundation.Icon.Primary"
|
||||
android:background="@null"
|
||||
android:padding="@dimen/l_50"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -568,7 +568,7 @@
|
||||
android:layout_marginStart="@dimen/l_50"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="@{viewModel.stateHideManagerName}"
|
||||
android:textAppearance="?appearanceTextTitleNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/home_manager_status"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -691,7 +691,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
style="?styleProgressDeterminate"
|
||||
style="@style/WidgetFoundation.ProgressBar"
|
||||
gone="@{viewModel.stateManagerProgress == 0 || viewModel.stateManagerProgress == 100}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
@ -711,7 +711,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_manager_wrapper">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="?styleButtonDefault"
|
||||
style="@style/WidgetFoundation.Button"
|
||||
gone="@{viewModel.stateManager != MagiskState.OBSOLETE}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -723,7 +723,7 @@
|
||||
app:iconSize="18dp" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="?styleButtonText"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{viewModel.stateManager == MagiskState.OBSOLETE}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -746,7 +746,7 @@
|
||||
android:layout_marginTop="@dimen/l2"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:text="@string/home_support_title"
|
||||
android:textAppearance="?appearanceTextTitleNormal" />
|
||||
android:textAppearance="@style/AppearanceFoundation.Title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="match_parent"
|
||||
@ -755,7 +755,7 @@
|
||||
android:layout_marginTop="@dimen/l_50"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:text="@string/home_support_content"
|
||||
android:textAppearance="?appearanceTextCaptionVariant" />
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
dividerHorizontal="@{R.drawable.divider_l1}"
|
||||
|
@ -33,7 +33,7 @@
|
||||
android:paddingTop="@dimen/l1">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?styleCardVariant"
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
@ -52,7 +52,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/install_step_options_icon"
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
isSelected="@{viewModel.step > 0}"
|
||||
android:layout_marginStart="@dimen/l_25"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -67,7 +67,7 @@
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:gravity="start"
|
||||
android:text="@string/install_options_title"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/install_step_options_button"
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/install_step_options_button"
|
||||
style="?styleButtonText"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{viewModel.step != 0}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -111,7 +111,7 @@
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?styleCardVariant"
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
@ -131,7 +131,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/install_step_method_icon"
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
isSelected="@{viewModel.step > 1}"
|
||||
android:layout_marginStart="@dimen/l_25"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -146,7 +146,7 @@
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:gravity="start"
|
||||
android:text="@string/install_method_title"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/install_step_method_button"
|
||||
@ -155,7 +155,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/install_step_method_button"
|
||||
style="?styleButtonText"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{viewModel.step != 1}"
|
||||
isEnabled="@{viewModel.method == @id/method_patch ? viewModel.data != null : viewModel.method != -1}"
|
||||
android:layout_width="wrap_content"
|
||||
@ -182,7 +182,7 @@
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
android:id="@+id/method_download"
|
||||
style="?styleRadioNormal"
|
||||
style="@style/WidgetFoundation.RadioButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/download_zip_only"
|
||||
@ -190,7 +190,7 @@
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
android:id="@+id/method_patch"
|
||||
style="?styleRadioNormal"
|
||||
style="@style/WidgetFoundation.RadioButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@drawable/ic_radio_check_button"
|
||||
@ -198,7 +198,7 @@
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
android:id="@+id/method_direct"
|
||||
style="?styleRadioNormal"
|
||||
style="@style/WidgetFoundation.RadioButton"
|
||||
gone="@{!viewModel.rooted}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -207,7 +207,7 @@
|
||||
|
||||
<com.google.android.material.radiobutton.MaterialRadioButton
|
||||
android:id="@+id/method_inactive_slot"
|
||||
style="?styleRadioNormal"
|
||||
style="@style/WidgetFoundation.RadioButton"
|
||||
gone="@{!viewModel.rooted || !viewModel.aB}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -221,7 +221,7 @@
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="?styleButtonText"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{viewModel.step != 2}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@ -249,7 +249,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/safetynet_attest_loading"
|
||||
android:textAppearance="?appearanceTextTitleNormal" />
|
||||
android:textAppearance="@style/AppearanceFoundation.Title" />
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -257,14 +257,14 @@
|
||||
android:layout_marginTop="@dimen/l1">
|
||||
|
||||
<ProgressBar
|
||||
style="?styleProgressDeterminate"
|
||||
style="@style/WidgetFoundation.ProgressBar"
|
||||
invisible="@{viewModel.progress <= 0}"
|
||||
android:layout_width="100dp"
|
||||
android:layout_gravity="center"
|
||||
android:progress="@{viewModel.progress}" />
|
||||
|
||||
<ProgressBar
|
||||
style="?styleProgressIndeterminate"
|
||||
style="@style/WidgetFoundation.ProgressBar.Indeterminate"
|
||||
invisibleUnless="@{viewModel.progress <= 0}"
|
||||
android:layout_width="100dp"
|
||||
android:layout_gravity="center" />
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
<com.google.android.material.circularreveal.cardview.CircularRevealCardView
|
||||
android:id="@+id/log_filter"
|
||||
style="?styleCardVariant"
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
<com.google.android.material.circularreveal.cardview.CircularRevealCardView
|
||||
android:id="@+id/module_filter"
|
||||
style="?styleCardVariant"
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
@ -82,11 +82,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/safetynet_attest_loading"
|
||||
android:textAppearance="?appearanceTextTitleNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ProgressBar
|
||||
style="?styleProgressIndeterminate"
|
||||
style="@style/WidgetFoundation.ProgressBar.Indeterminate"
|
||||
android:layout_marginTop="@dimen/l1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -37,7 +37,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/safetynet_attest_loading"
|
||||
android:textAppearance="?appearanceTextTitleNormal" />
|
||||
android:textAppearance="@style/AppearanceFoundation.Title" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
invisibleUnless="@{viewModel.success || viewModel.failed}"
|
||||
@ -48,7 +48,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/safetynet_icon"
|
||||
style="?styleImageBig"
|
||||
style="@style/WidgetFoundation.Image.Big"
|
||||
app:layout_constraintBottom_toTopOf="@+id/safetynet_magisk_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
@ -65,7 +65,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:text="@string/magisk"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
app:layout_constraintBottom_toTopOf="@+id/safetynet_manager_title"
|
||||
app:layout_constraintEnd_toStartOf="@+id/safetynet_magisk_version"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
@ -78,7 +78,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l_50"
|
||||
android:text="@{Info.env.magiskVersionString}"
|
||||
android:textAppearance="?appearanceTextCaptionNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/safetynet_magisk_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -92,7 +92,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/manager"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
app:layout_constraintBottom_toTopOf="@+id/safetynet_android_title"
|
||||
app:layout_constraintEnd_toStartOf="@+id/safetynet_manager_version"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
@ -105,7 +105,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l_50"
|
||||
android:text="@{BuildConfig.VERSION_NAME}"
|
||||
android:textAppearance="?appearanceTextCaptionNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/safetynet_manager_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -119,7 +119,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/system"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
app:layout_constraintBottom_toTopOf="@+id/safetynet_attestation"
|
||||
app:layout_constraintEnd_toStartOf="@+id/safetynet_android_version"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
@ -132,7 +132,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l_50"
|
||||
android:text="@{Build.VERSION.RELEASE}"
|
||||
android:textAppearance="?appearanceTextCaptionNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/safetynet_android_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -143,7 +143,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/safetynet_attestation"
|
||||
style="?styleCardElevated"
|
||||
style="@style/WidgetFoundation.Card.Elevated"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
@ -188,7 +188,7 @@
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:gravity="center"
|
||||
android:text="@{viewModel.safetyNetTitle}"
|
||||
android:textAppearance="?appearanceTextDisplayOnPrimary"
|
||||
android:textAppearance="@style/AppearanceFoundation.Display.OnPrimary"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
@ -222,12 +222,12 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="start"
|
||||
android:text="ctsProfile"
|
||||
android:textAppearance="?appearanceTextBodyOnPrimary"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body.OnPrimary"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="?styleIconOnPrimary"
|
||||
style="@style/WidgetFoundation.Icon.OnPrimary"
|
||||
isSelected="@{viewModel.ctsState}"
|
||||
android:layout_gravity="center"
|
||||
app:srcCompat="@drawable/ic_check_circle_md2" />
|
||||
@ -251,12 +251,12 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:gravity="start"
|
||||
android:text="basicIntegrity"
|
||||
android:textAppearance="?appearanceTextBodyOnPrimary"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body.OnPrimary"
|
||||
android:textStyle="bold"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="?styleIconOnPrimary"
|
||||
style="@style/WidgetFoundation.Icon.OnPrimary"
|
||||
isSelected="@{viewModel.basicIntegrityState}"
|
||||
android:layout_gravity="center"
|
||||
app:srcCompat="@drawable/ic_check_circle_md2" />
|
||||
@ -268,7 +268,7 @@
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="?styleButtonText"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
|
@ -23,66 +23,12 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:paddingTop="@dimen/l1"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/settings_card_dark"
|
||||
style="?styleCardNormal"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:onClick="@{() -> viewModel.darkModePressed()}"
|
||||
app:layout_constraintEnd_toStartOf="@+id/settings_card_redesign"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/settings_card_dark_icon"
|
||||
style="?styleIconNormal"
|
||||
android:background="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_day_night" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/settings_card_dark_pointer"
|
||||
style="?styleIconNormal"
|
||||
android:background="@null"
|
||||
android:rotation="180"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_back_md2" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"
|
||||
android:gravity="start|center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text="@string/settings_dark_mode_title"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/settings_card_dark_pointer"
|
||||
app:layout_constraintStart_toEndOf="@+id/settings_card_dark_icon"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/l1">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/settings_card_redesign"
|
||||
style="?styleCardNormal"
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/l1"
|
||||
@ -90,7 +36,7 @@
|
||||
android:layout_marginBottom="@dimen/l1"
|
||||
android:onClick="@{() -> viewModel.toggle(viewModel.redesign)}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/settings_card_dark"
|
||||
app:layout_constraintStart_toEndOf="@+id/settings_card_theme"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
@ -105,7 +51,7 @@
|
||||
android:gravity="start"
|
||||
android:paddingStart="@dimen/l1"
|
||||
android:text="Redesign"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/settings_card_redesign_switch"
|
||||
@ -116,8 +62,8 @@
|
||||
android:id="@+id/settings_card_redesign_switch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/l_50"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginEnd="@dimen/l_50"
|
||||
android:checked="@={viewModel.redesign}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -127,6 +73,60 @@
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/settings_card_theme"
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:onClick="@{() -> viewModel.themePressed()}"
|
||||
app:layout_constraintEnd_toStartOf="@+id/settings_card_redesign"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/settings_card_theme_dark_icon"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:background="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_paint" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/settings_card_theme_dark_pointer"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:background="@null"
|
||||
android:rotation="180"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_back_md2" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"
|
||||
android:gravity="start|center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text="@string/section_theme"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/settings_card_theme_dark_pointer"
|
||||
app:layout_constraintStart_toEndOf="@+id/settings_card_theme_dark_icon"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/superuser_hide"
|
||||
style="?styleCardNormal"
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
@ -47,7 +47,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/superuser_hide_icon"
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:background="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -60,7 +60,7 @@
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:singleLine="true"
|
||||
android:text="@string/magisk_hide_md2"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/superuser_hide_icon_pointer"
|
||||
@ -69,7 +69,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/superuser_hide_icon_pointer"
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:background="@null"
|
||||
android:rotation="180"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -83,7 +83,7 @@
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/superuser_safetynet"
|
||||
style="?styleCardNormal"
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
@ -98,7 +98,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/superuser_safetynet_icon"
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:background="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -111,7 +111,7 @@
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:singleLine="true"
|
||||
android:text="@string/safetyNet"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/superuser_safetynet_icon_pointer"
|
||||
@ -120,7 +120,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/superuser_safetynet_icon_pointer"
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:background="@null"
|
||||
android:rotation="180"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -172,11 +172,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/safetynet_attest_loading"
|
||||
android:textAppearance="?appearanceTextTitleNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ProgressBar
|
||||
style="?styleProgressIndeterminate"
|
||||
style="@style/WidgetFoundation.ProgressBar.Indeterminate"
|
||||
android:layout_marginTop="@dimen/l1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -1,8 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.topjohnwu.magisk.redesign.theme.Theme" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.topjohnwu.magisk.redesign.theme.ThemeViewModel" />
|
||||
@ -12,11 +15,194 @@
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
android:clipToPadding="false"
|
||||
android:fillViewport="true"
|
||||
android:paddingStart="@dimen/l1"
|
||||
android:paddingTop="@{viewModel.insets.top + (int) @dimen/internal_action_bar_size + (int) @dimen/l1}"
|
||||
android:paddingEnd="@dimen/l1"
|
||||
android:paddingBottom="@{viewModel.insets.bottom + (int) @dimen/l1}">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content"
|
||||
android:columnCount="2"
|
||||
android:orientation="vertical"
|
||||
android:useDefaultMargins="true">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/theme_card_dark"
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{() -> viewModel.darkModePressed()}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/settings_card_dark_icon"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:background="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_day_night" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/settings_card_dark_pointer"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:background="@null"
|
||||
android:rotation="180"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_back_md2" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:background="@null"
|
||||
android:gravity="start|center_vertical"
|
||||
android:singleLine="true"
|
||||
android:text="@string/settings_dark_mode_title"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/settings_card_dark_pointer"
|
||||
app:layout_constraintStart_toEndOf="@+id/settings_card_dark_icon"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/theme_default"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:theme="@style/ThemeFoundationMD2.Piplup"
|
||||
app:layout_constraintEnd_toStartOf="@+id/theme_amoled"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/theme_card_dark">
|
||||
|
||||
<include
|
||||
layout="@layout/item_theme"
|
||||
theme="@{Theme.Piplup}"
|
||||
viewModel="@{viewModel}" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/theme_amoled"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:theme="@style/ThemeFoundationMD2.Amoled"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/theme_default"
|
||||
app:layout_constraintTop_toBottomOf="@+id/theme_card_dark">
|
||||
|
||||
<include
|
||||
layout="@layout/item_theme"
|
||||
theme="@{Theme.PiplupAmoled}"
|
||||
viewModel="@{viewModel}" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/theme_rayquaza"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:theme="@style/ThemeFoundationMD2.Rayquaza"
|
||||
app:layout_constraintEnd_toEndOf="@+id/theme_default"
|
||||
app:layout_constraintStart_toStartOf="@+id/theme_default"
|
||||
app:layout_constraintTop_toBottomOf="@+id/theme_default">
|
||||
|
||||
<include
|
||||
layout="@layout/item_theme"
|
||||
theme="@{Theme.Rayquaza}"
|
||||
viewModel="@{viewModel}" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/theme_zapdos"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:theme="@style/ThemeFoundationMD2.Zapdos"
|
||||
app:layout_constraintEnd_toEndOf="@+id/theme_amoled"
|
||||
app:layout_constraintStart_toStartOf="@+id/theme_amoled"
|
||||
app:layout_constraintTop_toBottomOf="@+id/theme_amoled">
|
||||
|
||||
<include
|
||||
layout="@layout/item_theme"
|
||||
theme="@{Theme.Zapdos}"
|
||||
viewModel="@{viewModel}" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/theme_charmeleon"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:theme="@style/ThemeFoundationMD2.Charmeleon"
|
||||
app:layout_constraintEnd_toEndOf="@+id/theme_rayquaza"
|
||||
app:layout_constraintStart_toStartOf="@+id/theme_rayquaza"
|
||||
app:layout_constraintTop_toBottomOf="@+id/theme_rayquaza">
|
||||
|
||||
<include
|
||||
layout="@layout/item_theme"
|
||||
theme="@{Theme.Charmeleon}"
|
||||
viewModel="@{viewModel}" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/theme_mew"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:theme="@style/ThemeFoundationMD2.Mew"
|
||||
app:layout_constraintEnd_toEndOf="@+id/theme_zapdos"
|
||||
app:layout_constraintStart_toStartOf="@+id/theme_zapdos"
|
||||
app:layout_constraintTop_toBottomOf="@+id/theme_zapdos">
|
||||
|
||||
<include
|
||||
layout="@layout/item_theme"
|
||||
theme="@{Theme.Mew}"
|
||||
viewModel="@{viewModel}" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/theme_salamence"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:theme="@style/ThemeFoundationMD2.Salamence"
|
||||
app:layout_constraintEnd_toEndOf="@+id/theme_charmeleon"
|
||||
app:layout_constraintStart_toStartOf="@+id/theme_charmeleon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/theme_charmeleon">
|
||||
|
||||
<include
|
||||
layout="@layout/item_theme"
|
||||
theme="@{Theme.Salamence}"
|
||||
viewModel="@{viewModel}" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/hide_filters"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="?appearanceTextCaptionNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||
android:textColor="?colorPrimary"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@ -52,7 +52,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="@={viewModel.showSystem}"
|
||||
android:text="@string/show_system_app"
|
||||
android:textAppearance="?appearanceTextCaptionNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||
app:checkedIcon="@drawable/ic_check_md2"
|
||||
app:chipBackgroundColor="?colorSurfaceVariant"
|
||||
tools:checked="true" />
|
||||
@ -65,7 +65,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:checkable="false"
|
||||
android:text="@{viewModel.query}"
|
||||
android:textAppearance="?appearanceTextCaptionNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||
app:chipBackgroundColor="?colorSurfaceVariant" />
|
||||
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
@ -77,14 +77,14 @@
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:text="@string/hide_search"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="?appearanceTextCaptionNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||
android:textColor="?colorPrimary"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@+id/hide_filter_chip_group" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/hide_filter_search"
|
||||
style="?styleCardNormal"
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
@ -97,7 +97,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/hide_filter_title_search">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_vertical|start"
|
||||
@ -117,7 +117,7 @@
|
||||
android:paddingEnd="@dimen/l1"
|
||||
android:singleLine="true"
|
||||
android:text="@={viewModel.query}"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textColor="@color/color_text_transient"
|
||||
android:textColorHint="?colorOnSurfaceVariant" />
|
||||
|
||||
@ -128,6 +128,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:backgroundTint="?colorPrimary"
|
||||
app:tint="?colorOnPrimary"
|
||||
app:elevation="0dp"
|
||||
app:fabSize="mini"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/hide_filter_search"
|
||||
|
@ -21,7 +21,7 @@
|
||||
tools:layout_gravity="center">
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
style="?styleCheckboxNormal"
|
||||
style="@style/WidgetFoundation.Checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
@ -31,7 +31,7 @@
|
||||
tools:checked="true" />
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
style="?styleCheckboxNormal"
|
||||
style="@style/WidgetFoundation.Checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
@ -41,7 +41,7 @@
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
style="?styleCheckboxNormal"
|
||||
style="@style/WidgetFoundation.Checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
|
@ -63,14 +63,14 @@
|
||||
android:layout_marginBottom="@dimen/l1"
|
||||
android:text="@string/hide_search"
|
||||
android:textAllCaps="true"
|
||||
android:textAppearance="?appearanceTextCaptionNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||
android:textColor="?colorPrimary"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@+id/module_filter_search" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/module_filter_search"
|
||||
style="?styleCardNormal"
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
@ -82,7 +82,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_gravity="center_vertical|start"
|
||||
@ -102,7 +102,7 @@
|
||||
android:paddingEnd="@dimen/l1"
|
||||
android:singleLine="true"
|
||||
android:text="@={viewModel.query}"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textColor="@color/color_text_transient"
|
||||
android:textColorHint="?colorOnSurfaceVariant" />
|
||||
|
||||
@ -115,6 +115,7 @@
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
app:backgroundTint="?colorPrimary"
|
||||
app:elevation="0dp"
|
||||
app:tint="?colorOnPrimary"
|
||||
app:fabSize="mini"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/module_filter_search"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -122,7 +123,7 @@
|
||||
app:srcCompat="@drawable/ic_check_md2" />
|
||||
|
||||
<ProgressBar
|
||||
style="?styleProgressIndeterminateCircular"
|
||||
style="@style/WidgetFoundation.ProgressBar.Indeterminate.Circular"
|
||||
goneUnless="@{viewModel.searchLoading}"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
|
@ -20,7 +20,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="monospace"
|
||||
android:text="@{item.item}"
|
||||
android:textAppearance="?appearanceTextCaptionNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||
android:textSize="10sp"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
tools:layout_gravity="center|start">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?styleCardNormal"
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constrainedWidth="true"
|
||||
@ -41,7 +41,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.name}"
|
||||
android:textAppearance="?appearanceTextCaptionNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||
android:textStyle="bold"
|
||||
tools:text="\@topjohnwu" />
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/developer_link"
|
||||
style="?styleImageSmall"
|
||||
style="@style/WidgetFoundation.Image.Small"
|
||||
app:layout_constraintEnd_toStartOf="@+id/developer_more"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/developer_more"
|
||||
style="?styleImageSmall"
|
||||
style="@style/WidgetFoundation.Image.Small"
|
||||
android:layout_height="14sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/developer_link"
|
||||
app:layout_constraintStart_toEndOf="@+id/developer_link"
|
||||
|
@ -18,7 +18,7 @@
|
||||
</data>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?styleCardNormal"
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout_gravity="center"
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/hide_icon"
|
||||
style="?styleImageNormal"
|
||||
style="@style/WidgetFoundation.Image"
|
||||
android:layout_margin="@dimen/l1"
|
||||
android:alpha="@{item.isExpanded ? 0.1f : 1f}"
|
||||
android:src="@{item.item.info.icon}"
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/hide_action"
|
||||
style="?styleImageNormal"
|
||||
style="@style/WidgetFoundation.Image"
|
||||
isSelected="@{item.itemsCheckedPercent == 100}"
|
||||
goneUnless="@{item.isExpanded}"
|
||||
android:layout_margin="@dimen/l1"
|
||||
@ -70,7 +70,7 @@
|
||||
android:ellipsize="middle"
|
||||
android:singleLine="true"
|
||||
android:text="@{item.item.info.name}"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@+id/hide_package"
|
||||
app:layout_constraintEnd_toStartOf="@+id/hide_expand_icon"
|
||||
@ -85,7 +85,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.item.info.info.packageName}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/hide_name"
|
||||
app:layout_constraintStart_toStartOf="@+id/hide_name"
|
||||
@ -94,7 +94,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/hide_expand_icon"
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
invisible="@{item.item.processes.empty}"
|
||||
srcCompat="@{item.isExpanded ? R.drawable.ic_close : R.drawable.ic_back_md2}"
|
||||
android:background="@null"
|
||||
@ -122,7 +122,7 @@
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
style="?styleProgressDeterminate"
|
||||
style="@style/WidgetFoundation.ProgressBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="top"
|
||||
android:progress="@{item.itemsCheckedPercent}" />
|
||||
|
@ -31,7 +31,7 @@
|
||||
android:layout_marginBottom="@dimen/l_50"
|
||||
android:singleLine="true"
|
||||
android:text="@{item.item.name}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/hide_process_checkbox"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/hide_process_checkbox"
|
||||
style="?styleImageSmall"
|
||||
style="@style/WidgetFoundation.Image.Small"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
isSelected="@{item.isHidden}"
|
||||
|
@ -52,7 +52,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.item.appName}"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@+id/log_date"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@ -65,7 +65,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.date}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toTopOf="@+id/log_app_details"
|
||||
app:layout_constraintTop_toBottomOf="@+id/log_app_name"
|
||||
@ -76,7 +76,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.format(`%s %s`, @string/pid(item.item.fromPid), @string/target_uid(item.item.toUid))}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/log_command"
|
||||
@ -90,7 +90,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="monospace"
|
||||
android:text="@{item.item.command}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/log_app_details"
|
||||
|
@ -44,7 +44,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/track_bullet"
|
||||
style="?styleImageSmall"
|
||||
style="@style/WidgetFoundation.Image.Small"
|
||||
isSelected="@{isSelected}"
|
||||
srcCompat="@{bullet}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
@ -15,7 +15,7 @@
|
||||
</data>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="?styleButtonOutlined"
|
||||
style="@style/WidgetFoundation.Button.Outlined"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{() -> viewModel.installPressed()}"
|
||||
|
@ -20,7 +20,7 @@
|
||||
</data>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?styleCardVariant"
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
isEnabled="@{!Config.coreOnly && !item.removed}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/module_state_icon"
|
||||
style="?styleImageSmall"
|
||||
style="@style/WidgetFoundation.Image.Small"
|
||||
gone="@{!item.removed && !item.updated}"
|
||||
srcCompat="@{item.removed ? R.drawable.ic_delete_md2 : (item.updated ? R.drawable.ic_update_md2 : 0)}"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
@ -55,7 +55,7 @@
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:text="@{item.item.name}"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/module_state_icon"
|
||||
@ -69,7 +69,7 @@
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:text="@{@string/module_version_author(item.item.version, item.item.author)}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/module_state_icon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_title"
|
||||
@ -84,7 +84,7 @@
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:text="@{item.item.description}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_version_author"
|
||||
tools:lines="4"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
@ -98,7 +98,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_description" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="?styleButtonText"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{(v) -> item.delete(viewModel)}"
|
||||
|
@ -16,7 +16,7 @@
|
||||
</data>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?styleCardVariant"
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/policy_app_icon"
|
||||
style="?styleImageBig"
|
||||
style="@style/WidgetFoundation.Image.Big"
|
||||
android:src="@{item.icon}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -52,7 +52,7 @@
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:text="@{item.item.appName}"
|
||||
android:textAppearance="?appearanceTextTitleNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
android:textIsSelectable="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -67,7 +67,7 @@
|
||||
android:gravity="center"
|
||||
android:singleLine="true"
|
||||
android:text="@{item.item.packageName}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
android:textColor="@android:color/tertiary_text_dark"
|
||||
android:textIsSelectable="false"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -94,7 +94,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/policy_notify"
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:background="?selectableItemBackground"
|
||||
isSelected="@{item.shouldNotify}"
|
||||
tooltipText="@{@string/superuser_toggle_notification}"
|
||||
@ -111,7 +111,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/policy_log"
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:background="?selectableItemBackground"
|
||||
isSelected="@{item.shouldLog}"
|
||||
tooltipText="@{@string/superuser_toggle_log}"
|
||||
@ -126,7 +126,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/policy_delete"
|
||||
style="?styleButtonText"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{() -> viewModel.deletePressed(item)}"
|
||||
@ -145,7 +145,7 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
isEnabled="@{item.isEnabled}"
|
||||
isSelected="@{item.isExpanded}"
|
||||
android:layout_gravity="top|end"
|
||||
|
@ -18,7 +18,7 @@
|
||||
</data>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?styleCardVariant"
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout_gravity="center"
|
||||
@ -37,7 +37,7 @@
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:text="@{item.item.name}"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@ -49,7 +49,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{@string/module_version_author(item.item.version ?? `?`, item.item.author ?? `?`)}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
app:layout_constraintEnd_toEndOf="@+id/module_title"
|
||||
app:layout_constraintStart_toStartOf="@+id/module_title"
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_title"
|
||||
@ -64,7 +64,7 @@
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:text="@{item.item.description}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
app:layout_constraintTop_toBottomOf="@+id/module_version_author"
|
||||
tools:lines="4"
|
||||
tools:text="@tools:sample/lorem/random" />
|
||||
@ -82,7 +82,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:text="@{item.item.lastUpdateString}"
|
||||
android:textAppearance="?appearanceTextCaptionVariant"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/module_info"
|
||||
@ -93,7 +93,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/module_info"
|
||||
style="?styleIconNormal"
|
||||
style="@style/WidgetFoundation.Icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:alpha=".5"
|
||||
android:onClick="@{() -> viewModel.infoPressed(item)}"
|
||||
@ -106,7 +106,7 @@
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/module_download"
|
||||
android:layout_width="wrap_content"
|
||||
style="?styleIconPrimary"
|
||||
style="@style/WidgetFoundation.Icon.Primary"
|
||||
android:paddingStart="@dimen/l_50"
|
||||
isEnabled="@{!(item.progress == -100 || (item.progress > 0 && item.progress < 100))}"
|
||||
android:contentDescription="@string/download"
|
||||
@ -125,7 +125,7 @@
|
||||
android:layout_gravity="bottom">
|
||||
|
||||
<ProgressBar
|
||||
style="?styleProgressDeterminate"
|
||||
style="@style/WidgetFoundation.ProgressBar"
|
||||
goneUnless="@{item.progress > 0 && item.progress < 100}"
|
||||
progressAnimated="@{item.progress}"
|
||||
android:layout_width="match_parent"
|
||||
@ -133,7 +133,7 @@
|
||||
tools:progress="40" />
|
||||
|
||||
<androidx.core.widget.ContentLoadingProgressBar
|
||||
style="?styleProgressIndeterminate"
|
||||
style="@style/WidgetFoundation.ProgressBar.Indeterminate"
|
||||
goneUnless="@{item.progress == -100}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -11,7 +11,7 @@
|
||||
</data>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?styleCardNormal"
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="?colorError">
|
||||
@ -22,7 +22,7 @@
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/l1"
|
||||
android:text="@string/module_safe_mode_message"
|
||||
android:textAppearance="?appearanceTextCaptionOnPrimary"
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.OnPrimary"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
@ -25,7 +25,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.title}"
|
||||
android:textAppearance="?appearanceTextBodyNormal"
|
||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||
android:textColor="@color/color_primary_transient"
|
||||
android:textStyle="bold"
|
||||
tools:text="@tools:sample/lorem/random"
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/module_button"
|
||||
style="?styleButtonTextSecondary"
|
||||
style="@style/WidgetFoundation.Button.Text.Secondary"
|
||||
gone="@{!item.hasButton}"
|
||||
android:onClick="@{() -> viewModel.sectionPressed(item)}"
|
||||
android:layout_width="wrap_content"
|
||||
|
182
app/src/main/res/layout/item_theme.xml
Normal file
182
app/src/main/res/layout/item_theme.xml
Normal file
@ -0,0 +1,182 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.topjohnwu.magisk.redesign.theme.ThemeViewModel" />
|
||||
|
||||
<variable
|
||||
name="theme"
|
||||
type="com.topjohnwu.magisk.redesign.theme.Theme" />
|
||||
|
||||
</data>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{() -> viewModel.saveTheme(theme)}"
|
||||
app:cardBackgroundColor="@android:color/transparent"
|
||||
app:strokeColor="?colorPrimaryVariant"
|
||||
tools:layout_gravity="center">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?colorSurface">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/theme_appbar"
|
||||
style="@style/WidgetFoundation.Appbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.appbar.MaterialToolbar
|
||||
style="@style/WidgetFoundation.Toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="17sp"
|
||||
android:layout_gravity="center_vertical|start"
|
||||
android:background="?colorOnSurface" />
|
||||
|
||||
<View
|
||||
android:layout_width="70dp"
|
||||
android:layout_height="12sp"
|
||||
android:layout_gravity="center_vertical|start"
|
||||
android:layout_marginTop="@dimen/l_25"
|
||||
android:background="?colorOnSurfaceVariant" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/theme_card_bottom"
|
||||
style="@style/WidgetFoundation.Card.Variant"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/theme_appbar">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/l1">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="17sp"
|
||||
android:background="?colorOnSurface" />
|
||||
|
||||
<View
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="11sp"
|
||||
android:layout_marginTop="@dimen/l_25"
|
||||
android:background="?colorOnSurfaceVariant" />
|
||||
|
||||
<View
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="11sp"
|
||||
android:layout_marginTop="@dimen/l_25"
|
||||
android:background="?colorOnSurfaceVariant" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/theme_primary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:background="?colorPrimary"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/l1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/theme_card_bottom">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="125dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{theme.themeName}"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title.OnPrimary"
|
||||
android:textStyle="bold"
|
||||
tools:text="Default" />
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="12sp"
|
||||
android:background="?colorOnPrimaryVariant" />
|
||||
|
||||
<View
|
||||
android:layout_width="75dp"
|
||||
android:layout_height="12sp"
|
||||
android:layout_marginTop="@dimen/l_25"
|
||||
android:background="?colorOnPrimaryVariant" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/theme_navigation"
|
||||
style="@style/WidgetFoundation.Card.Elevated"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:layout_marginBottom="@dimen/l1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/theme_primary">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/l1">
|
||||
|
||||
<View
|
||||
style="@style/WidgetFoundation.Image.Small"
|
||||
android:background="?colorSecondary" />
|
||||
|
||||
<View
|
||||
style="@style/WidgetFoundation.Image.Small"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:background="?colorDisabled" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="@style/WidgetFoundation.Icon.OnPrimary"
|
||||
gone="@{!theme.isSelected}"
|
||||
android:layout_gravity="end|top"
|
||||
android:layout_margin="@dimen/l_50"
|
||||
android:background="@drawable/bg_selection_circle_green"
|
||||
app:srcCompat="@drawable/ic_check_md2"
|
||||
app:tint="#fff" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</layout>
|
@ -10,6 +10,6 @@
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:paddingTop="10dp"
|
||||
android:textAppearance="?appearanceTextCaptionNormal" />
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption" />
|
||||
|
||||
</ScrollView>
|
@ -7,4 +7,4 @@
|
||||
android:gravity="start|center_vertical"
|
||||
android:singleLine="true"
|
||||
tools:text="@string/magisk"
|
||||
android:textAppearance="?appearanceTextCaptionVariant" />
|
||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant" />
|
@ -1,24 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="ThemeFoundationMD2.Default">
|
||||
<item name="colorPrimary">#2196F3</item>
|
||||
<item name="colorPrimaryVariant">#802196F3</item>
|
||||
<item name="colorSecondary">#63B9FF</item>
|
||||
<item name="colorSecondaryVariant">#8063B9FF</item>
|
||||
<!--1st party themes-->
|
||||
|
||||
<style name="ThemeFoundationMD2.Piplup">
|
||||
<item name="colorPrimary">#4EAFF5</item>
|
||||
<item name="colorPrimaryVariant">#804EAFF5</item>
|
||||
<item name="colorSecondary">#3E78AF</item>
|
||||
<item name="colorSecondaryVariant">#803E78AF</item>
|
||||
<item name="colorSurface">#0D0D0D</item>
|
||||
<item name="colorSurfaceVariant">#1F1F1F</item>
|
||||
<item name="colorSurfaceSurfaceVariant">?colorSurfaceVariant</item>
|
||||
<item name="colorOnPrimary">#F2F2F2</item>
|
||||
<item name="colorOnPrimary">#F9F9F9</item>
|
||||
<item name="colorOnPrimaryVariant">#D9E6E6E6</item>
|
||||
<item name="colorOnSecondary">#F2F2F2</item>
|
||||
<item name="colorOnSecondary">#F9F9F9</item>
|
||||
<item name="colorOnBackground">?colorOnSurface</item>
|
||||
<item name="colorError">#CC0047</item>
|
||||
<item name="colorOnError">#F2F2F2</item>
|
||||
<item name="colorOnError">#F9F9F9</item>
|
||||
<item name="colorOnSurface">#D8D8D8</item>
|
||||
<item name="colorOnSurfaceVariant">#80BABABA</item>
|
||||
<item name="colorDisabled">#808080</item>
|
||||
<item name="colorDisabledVariant">#66808080</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeFoundationMD2.Amoled" parent="ThemeFoundationMD2.Piplup">
|
||||
<item name="colorSurface">#000</item>
|
||||
<item name="colorOnPrimary">#FFF</item>
|
||||
<item name="colorOnSecondary">#FFF</item>
|
||||
<item name="colorOnBackground">#000</item>
|
||||
<item name="colorOnError">#FFF</item>
|
||||
</style>
|
||||
|
||||
<!--3rd party themes-->
|
||||
|
||||
</resources>
|
@ -7,84 +7,6 @@
|
||||
<attr name="colorControl" format="reference" />
|
||||
<!--endregion-->
|
||||
|
||||
<!--region Widgets-->
|
||||
|
||||
<!--Appbar-->
|
||||
<attr name="styleAppbar" format="reference" />
|
||||
|
||||
<!--Toolbar-->
|
||||
<attr name="styleToolbar" format="reference" />
|
||||
|
||||
<!--Card-->
|
||||
<attr name="styleCardNormal" format="reference" />
|
||||
<attr name="styleCardVariant" format="reference" />
|
||||
<attr name="styleCardElevated" format="reference" />
|
||||
<attr name="styleCardOnPrimary" format="reference" />
|
||||
|
||||
<!--Button-->
|
||||
<attr name="styleButtonDefault" format="reference" />
|
||||
<attr name="styleButtonDefaultOnPrimary" format="reference" />
|
||||
<attr name="styleButtonOutlined" format="reference" />
|
||||
<attr name="styleButtonOutlinedOnPrimary" format="reference" />
|
||||
<attr name="styleButtonFlat" format="reference" />
|
||||
<attr name="styleButtonFlatOnPrimary" format="reference" />
|
||||
<attr name="styleButtonText" format="reference" />
|
||||
<attr name="styleButtonTextSecondary" format="reference" />
|
||||
<attr name="styleButtonTextOnPrimary" format="reference" />
|
||||
<attr name="styleButtonError" format="reference" />
|
||||
|
||||
<!--Icon-->
|
||||
<attr name="styleIconNormal" format="reference" />
|
||||
<attr name="styleIconPrimary" format="reference" />
|
||||
<attr name="styleIconOnPrimary" format="reference" />
|
||||
<attr name="styleIconError" format="reference" />
|
||||
|
||||
<!--Image-->
|
||||
<attr name="styleImageBig" format="reference" />
|
||||
<attr name="styleImageNormal" format="reference" />
|
||||
<attr name="styleImageSmall" format="reference" />
|
||||
|
||||
<!--Checkbox-->
|
||||
<attr name="styleCheckboxNormal" format="reference" />
|
||||
|
||||
<!--RadioButton-->
|
||||
<attr name="styleRadioNormal" format="reference" />
|
||||
|
||||
<!--Progress-->
|
||||
<attr name="styleProgressDeterminate" format="reference" />
|
||||
<attr name="styleProgressIndeterminate" format="reference" />
|
||||
<attr name="styleProgressIndeterminateCircular" format="reference" />
|
||||
|
||||
<!--endregion-->
|
||||
|
||||
<!--region Texts-->
|
||||
|
||||
<!--Display-->
|
||||
<attr name="appearanceTextDisplayNormal" format="reference" />
|
||||
<attr name="appearanceTextDisplayVariant" format="reference" />
|
||||
<attr name="appearanceTextDisplayOnPrimary" format="reference" />
|
||||
<attr name="appearanceTextDisplayOnPrimaryVariant" format="reference" />
|
||||
|
||||
<!--Title-->
|
||||
<attr name="appearanceTextTitleNormal" format="reference" />
|
||||
<attr name="appearanceTextTitleVariant" format="reference" />
|
||||
<attr name="appearanceTextTitleOnPrimary" format="reference" />
|
||||
<attr name="appearanceTextTitleOnPrimaryVariant" format="reference" />
|
||||
|
||||
<!--Body-->
|
||||
<attr name="appearanceTextBodyNormal" format="reference" />
|
||||
<attr name="appearanceTextBodyVariant" format="reference" />
|
||||
<attr name="appearanceTextBodyOnPrimary" format="reference" />
|
||||
<attr name="appearanceTextBodyOnPrimaryVariant" format="reference" />
|
||||
|
||||
<!--Caption-->
|
||||
<attr name="appearanceTextCaptionNormal" format="reference" />
|
||||
<attr name="appearanceTextCaptionVariant" format="reference" />
|
||||
<attr name="appearanceTextCaptionOnPrimary" format="reference" />
|
||||
<attr name="appearanceTextCaptionOnPrimaryVariant" format="reference" />
|
||||
|
||||
<!--endregion-->
|
||||
|
||||
<!--region Colors-->
|
||||
|
||||
<!--Static-->
|
||||
|
@ -14,6 +14,7 @@
|
||||
<string name="section_superuser">@string/superuser</string>
|
||||
<string name="section_log">@string/log</string>
|
||||
<string name="section_settings">@string/settings</string>
|
||||
<string name="section_theme">Themes</string>
|
||||
|
||||
<string name="installed_error_md2">is not installed</string>
|
||||
<string name="channel_error_md2">has invalid update channel!</string>
|
||||
|
@ -25,87 +25,10 @@
|
||||
<item name="selectableItemBackground">@drawable/bg_selectable</item>
|
||||
<item name="selectableItemBackgroundBorderless">@drawable/bg_selectable_borderless</item>
|
||||
<item name="actionBarSize">@dimen/internal_action_bar_size</item>
|
||||
|
||||
<item name="styleAppbar">@style/WidgetFoundation.Appbar</item>
|
||||
|
||||
<item name="styleToolbar">@style/WidgetFoundation.Toolbar</item>
|
||||
|
||||
<item name="styleCardNormal">@style/WidgetFoundation.Card</item>
|
||||
<item name="styleCardVariant">@style/WidgetFoundation.Card.Variant</item>
|
||||
<item name="styleCardElevated">@style/WidgetFoundation.Card.Elevated</item>
|
||||
<item name="styleCardOnPrimary">@style/WidgetFoundation.Card.OnPrimary</item>
|
||||
|
||||
<item name="styleButtonDefault">@style/WidgetFoundation.Button</item>
|
||||
<item name="styleButtonDefaultOnPrimary">@style/WidgetFoundation.Button.OnPrimary</item>
|
||||
<item name="styleButtonOutlined">@style/WidgetFoundation.Button.Outlined</item>
|
||||
<item name="styleButtonOutlinedOnPrimary">
|
||||
@style/WidgetFoundation.Button.Outlined.OnPrimary
|
||||
</item>
|
||||
<item name="styleButtonFlat">@style/WidgetFoundation.Button.Flat</item>
|
||||
<item name="styleButtonFlatOnPrimary">@style/WidgetFoundation.Button.Flat.OnPrimary</item>
|
||||
<item name="styleButtonText">@style/WidgetFoundation.Button.Text</item>
|
||||
<item name="styleButtonTextSecondary">@style/WidgetFoundation.Button.Text.Secondary</item>
|
||||
<item name="styleButtonTextOnPrimary">@style/WidgetFoundation.Button.Text.OnPrimary</item>
|
||||
<item name="styleButtonError">@style/WidgetFoundation.Button.Error</item>
|
||||
|
||||
<item name="styleIconNormal">@style/WidgetFoundation.Icon</item>
|
||||
<item name="styleIconPrimary">@style/WidgetFoundation.Icon.Primary</item>
|
||||
<item name="styleIconOnPrimary">@style/WidgetFoundation.Icon.OnPrimary</item>
|
||||
<item name="styleIconError">@style/WidgetFoundation.Icon.Error</item>
|
||||
|
||||
<item name="styleImageBig">@style/WidgetFoundation.Image.Big</item>
|
||||
<item name="styleImageNormal">@style/WidgetFoundation.Image</item>
|
||||
<item name="styleImageSmall">@style/WidgetFoundation.Image.Small</item>
|
||||
|
||||
<item name="styleCheckboxNormal">@style/WidgetFoundation.Checkbox</item>
|
||||
|
||||
<item name="styleRadioNormal">@style/WidgetFoundation.RadioButton</item>
|
||||
|
||||
<item name="styleProgressDeterminate">@style/WidgetFoundation.ProgressBar</item>
|
||||
<item name="styleProgressIndeterminate">
|
||||
@style/WidgetFoundation.ProgressBar.Indeterminate
|
||||
</item>
|
||||
<item name="styleProgressIndeterminateCircular">
|
||||
@style/WidgetFoundation.ProgressBar.Indeterminate.Circular
|
||||
</item>
|
||||
|
||||
<!--///-->
|
||||
|
||||
<item name="appearanceTextDisplayNormal">@style/AppearanceFoundation.Display</item>
|
||||
<item name="appearanceTextDisplayVariant">@style/AppearanceFoundation.Display.Variant</item>
|
||||
<item name="appearanceTextDisplayOnPrimary">@style/AppearanceFoundation.Display.OnPrimary
|
||||
</item>
|
||||
<item name="appearanceTextDisplayOnPrimaryVariant">
|
||||
@style/AppearanceFoundation.Display.OnPrimary.Variant
|
||||
</item>
|
||||
|
||||
<item name="appearanceTextTitleNormal">@style/AppearanceFoundation.Title</item>
|
||||
<item name="appearanceTextTitleVariant">@style/AppearanceFoundation.Title.Variant</item>
|
||||
<item name="appearanceTextTitleOnPrimary">@style/AppearanceFoundation.Title.OnPrimary</item>
|
||||
<item name="appearanceTextTitleOnPrimaryVariant">
|
||||
@style/AppearanceFoundation.Title.OnPrimary.Variant
|
||||
</item>
|
||||
|
||||
<item name="appearanceTextBodyNormal">@style/AppearanceFoundation.Body</item>
|
||||
<item name="appearanceTextBodyVariant">@style/AppearanceFoundation.Body.Variant</item>
|
||||
<item name="appearanceTextBodyOnPrimary">@style/AppearanceFoundation.Body.OnPrimary</item>
|
||||
<item name="appearanceTextBodyOnPrimaryVariant">
|
||||
@style/AppearanceFoundation.Body.OnPrimary.Variant
|
||||
</item>
|
||||
|
||||
<item name="appearanceTextCaptionNormal">@style/AppearanceFoundation.Caption</item>
|
||||
<item name="appearanceTextCaptionVariant">@style/AppearanceFoundation.Caption.Variant</item>
|
||||
<item name="appearanceTextCaptionOnPrimary">@style/AppearanceFoundation.Caption.OnPrimary
|
||||
</item>
|
||||
<item name="appearanceTextCaptionOnPrimaryVariant">
|
||||
@style/AppearanceFoundation.Caption.OnPrimary.Variant
|
||||
</item>
|
||||
</style>
|
||||
|
||||
<style name="Foundation.Default" parent="Foundation.Base">
|
||||
<item name="android:theme">@style/ThemeFoundationMD2.Default</item>
|
||||
<!--setting window background to transparent should reduce overdraw-->
|
||||
<!--<item name="android:windowBackground">@android:color/transparent</item>-->
|
||||
<item name="android:windowBackground">?colorSurface</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -1,10 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
These widgets are implementation of corresponding attribute. Never and I mean fucking never! use
|
||||
these directly.
|
||||
|
||||
Although it is possible, it wouldn't automatically change the style when theme changes to "night"
|
||||
variant. Make sure to use style referenced by attribute defined it attrs.xml.
|
||||
-->
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="WidgetFoundation.Appbar" parent="Widget.MaterialComponents.AppBarLayout.Surface">
|
||||
@ -13,9 +7,9 @@ variant. Make sure to use style referenced by attribute defined it attrs.xml.
|
||||
</style>
|
||||
|
||||
<style name="WidgetFoundation.Toolbar" parent="Widget.MaterialComponents.Toolbar.Surface">
|
||||
<item name="titleTextAppearance">?appearanceTextTitleNormal</item>
|
||||
<item name="titleTextAppearance">@style/AppearanceFoundation.Title</item>
|
||||
<item name="titleTextColor">?colorOnSurface</item>
|
||||
<item name="subtitleTextAppearance">?appearanceTextCaptionNormal</item>
|
||||
<item name="subtitleTextAppearance">@style/AppearanceFoundation.Caption</item>
|
||||
<item name="subtitleTextColor">?colorOnSurfaceVariant</item>
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
<item name="contentInsetStartWithNavigation">0dp</item>
|
||||
@ -154,7 +148,7 @@ variant. Make sure to use style referenced by attribute defined it attrs.xml.
|
||||
|
||||
<style name="WidgetFoundation.Checkbox" parent="Widget.AppCompat.CompoundButton.CheckBox">
|
||||
<item name="android:textColor">?attr/colorOnSurface</item>
|
||||
<item name="android:textAppearance">?appearanceTextBodyNormal</item>
|
||||
<item name="android:textAppearance">@style/AppearanceFoundation.Body</item>
|
||||
<item name="android:paddingStart">@dimen/l1</item>
|
||||
<item name="android:paddingEnd">@dimen/l1</item>
|
||||
<item name="tint">?colorPrimary</item>
|
||||
@ -163,7 +157,7 @@ variant. Make sure to use style referenced by attribute defined it attrs.xml.
|
||||
|
||||
<style name="WidgetFoundation.RadioButton" parent="Widget.AppCompat.CompoundButton.RadioButton">
|
||||
<item name="android:textColor">?attr/colorOnSurface</item>
|
||||
<item name="android:textAppearance">?appearanceTextBodyNormal</item>
|
||||
<item name="android:textAppearance">@style/AppearanceFoundation.Body</item>
|
||||
<item name="android:paddingStart">@dimen/l1</item>
|
||||
<item name="android:paddingEnd">@dimen/l1</item>
|
||||
<item name="tint">?colorPrimary</item>
|
||||
|
@ -10,14 +10,14 @@
|
||||
<style name="W.Home.Extra.Title">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:textAppearance">?appearanceTextCaptionVariant</item>
|
||||
<item name="android:textAppearance">@style/AppearanceFoundation.Caption.Variant</item>
|
||||
<item name="android:singleLine">true</item>
|
||||
</style>
|
||||
|
||||
<style name="W.Home.Extra.Value">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:textAppearance">?appearanceTextCaptionNormal</item>
|
||||
<item name="android:textAppearance">@style/AppearanceFoundation.Caption</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:layout_marginStart">@dimen/l_50</item>
|
||||
<item name="layout_constrainedWidth">true</item>
|
||||
|
@ -9,11 +9,9 @@
|
||||
## Inheritance
|
||||
|
||||
You might want to inherit default values from "base" theme. You can do so implicitly by just
|
||||
writing `<style name="ThemeFoundationMD2.MySuperAwesomeTheme" parent="ThemeFoundationMD2.Default">`.
|
||||
writing `<style name="ThemeFoundationMD2.MySuperAwesomeTheme" parent="ThemeFoundationMD2.Piplup">`.
|
||||
With this approach you can only change values you (don't) like - such as `colorPrimary` or
|
||||
`colorSecondary`.
|
||||
There's also an option to define theme completely from ground up and that's done just by
|
||||
omitting `parent="..."`. It will inherit _nothing_ from the base.
|
||||
|
||||
## Day / Night ? How do I define both in one theme?
|
||||
|
||||
@ -22,8 +20,7 @@
|
||||
on user's requested configuration. (Always light, Always dark, Follow system)
|
||||
|
||||
You might choose to define only "Day" theme with Dark colors to have dark theme regardless.
|
||||
That's super lazy approach and is discouraged but the framework permits it. If not inherited
|
||||
from default theme, you must define all colors yourself in both day AND night variants.
|
||||
That's super lazy approach and is discouraged but the framework permits it.
|
||||
|
||||
## What to theme
|
||||
|
||||
@ -41,30 +38,80 @@
|
||||
!! notice. In repeated attempts to push such themes you will be automatically blacklisted.
|
||||
-->
|
||||
|
||||
<style name="ThemeFoundationMD2" parent="" />
|
||||
<style name="ThemeFoundationMD2" parent="Foundation.Default" />
|
||||
|
||||
<!--1st party themes-->
|
||||
|
||||
<style name="ThemeFoundationMD2.Default">
|
||||
<item name="colorPrimary">#2196F3</item>
|
||||
<item name="colorPrimaryVariant">#802196F3</item>
|
||||
<item name="colorSecondary">#1766A6</item>
|
||||
<item name="colorSecondaryVariant">#801766A6</item>
|
||||
<item name="colorSurface">#F2F2F2</item>
|
||||
<style name="ThemeFoundationMD2.Piplup">
|
||||
<item name="colorPrimary">#4EAFF5</item>
|
||||
<item name="colorPrimaryVariant">#804EAFF5</item>
|
||||
<item name="colorSecondary">#3E78AF</item>
|
||||
<item name="colorSecondaryVariant">#803E78AF</item>
|
||||
<item name="colorSurface">#F9F9F9</item>
|
||||
<item name="colorSurfaceVariant">#E8E8E8</item>
|
||||
<item name="colorSurfaceSurfaceVariant">?colorSurface</item>
|
||||
<item name="colorOnPrimary">#F2F2F2</item>
|
||||
<item name="colorOnPrimary">#F9F9F9</item>
|
||||
<item name="colorOnPrimaryVariant">#D9E6E6E6</item>
|
||||
<item name="colorOnSecondary">#F2F2F2</item>
|
||||
<item name="colorOnBackground">#F2F2F2</item>
|
||||
<item name="colorOnSecondary">#F9F9F9</item>
|
||||
<item name="colorOnBackground">?colorOnSurface</item>
|
||||
<item name="colorError">#CC0047</item>
|
||||
<item name="colorOnError">#F2F2F2</item>
|
||||
<item name="colorOnError">#F9F9F9</item>
|
||||
<item name="colorOnSurface">#444444</item>
|
||||
<item name="colorOnSurfaceVariant">#80444444</item>
|
||||
<item name="colorDisabled">#808080</item>
|
||||
<item name="colorDisabledVariant">#66808080</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeFoundationMD2.Amoled" parent="ThemeFoundationMD2.Piplup">
|
||||
<item name="colorSurface">#FFF</item>
|
||||
<item name="colorOnPrimary">#FFF</item>
|
||||
<item name="colorOnSecondary">#FFF</item>
|
||||
<item name="colorOnBackground">#FFF</item>
|
||||
<item name="colorOnError">#FFF</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeFoundationMD2.Rayquaza" parent="ThemeFoundationMD2.Piplup">
|
||||
<item name="colorPrimary">#68A17F</item>
|
||||
<item name="colorPrimaryVariant">#8068A17F</item>
|
||||
<item name="colorSecondary">#2F6D43</item>
|
||||
<item name="colorSecondaryVariant">#802F6D43</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeFoundationMD2.Zapdos" parent="ThemeFoundationMD2.Piplup">
|
||||
<item name="colorPrimary">#FBD179</item>
|
||||
<item name="colorPrimaryVariant">#80FBD179</item>
|
||||
<item name="colorSecondary">#B29667</item>
|
||||
<item name="colorSecondaryVariant">#80B29667</item>
|
||||
<item name="colorOnPrimary">#000000</item>
|
||||
<item name="colorOnPrimaryVariant">#D9222222</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeFoundationMD2.Charmeleon" parent="ThemeFoundationMD2.Piplup">
|
||||
<item name="colorPrimary">#DB7366</item>
|
||||
<item name="colorPrimaryVariant">#80DB7366</item>
|
||||
<item name="colorSecondary">#B65247</item>
|
||||
<item name="colorSecondaryVariant">#80B65247</item>
|
||||
<item name="colorOnPrimary">#000000</item>
|
||||
<item name="colorOnPrimaryVariant">#D9222222</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeFoundationMD2.Mew" parent="ThemeFoundationMD2.Piplup">
|
||||
<item name="colorPrimary">#D9ADB7</item>
|
||||
<item name="colorPrimaryVariant">#80E9BBC5</item>
|
||||
<item name="colorSecondary">#B5889B</item>
|
||||
<item name="colorSecondaryVariant">#80B5889B</item>
|
||||
<item name="colorOnPrimary">#000000</item>
|
||||
<item name="colorOnPrimaryVariant">#D9222222</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeFoundationMD2.Salamence" parent="ThemeFoundationMD2.Piplup">
|
||||
<item name="colorPrimary">#70B2C6</item>
|
||||
<item name="colorPrimaryVariant">#8070B2C6</item>
|
||||
<item name="colorSecondary">#C06A75</item>
|
||||
<item name="colorSecondaryVariant">#80C06A75</item>
|
||||
<item name="colorOnPrimary">#000000</item>
|
||||
<item name="colorOnPrimaryVariant">#D9222222</item>
|
||||
</style>
|
||||
|
||||
<!--3rd party themes-->
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user