You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
UI tweaks for pre API 21
This commit is contained in:
@@ -96,33 +96,27 @@
|
||||
<CheckBox
|
||||
gone="@{Info.isSAR}"
|
||||
style="@style/WidgetFoundation.Checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:checked="@={Config.keepVerity}"
|
||||
android:gravity="center"
|
||||
android:text="@string/keep_dm_verity"
|
||||
tools:checked="true" />
|
||||
|
||||
<CheckBox
|
||||
gone="@{Info.isFBE}"
|
||||
style="@style/WidgetFoundation.Checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:checked="@={Config.keepEnc}"
|
||||
android:gravity="center"
|
||||
android:text="@string/keep_force_encryption"
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
<CheckBox
|
||||
gone="@{Info.ramdisk}"
|
||||
style="@style/WidgetFoundation.Checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="start|center_vertical"
|
||||
android:checked="@={Config.recovery}"
|
||||
android:gravity="center"
|
||||
android:text="@string/recovery_mode"
|
||||
app:tint="?colorPrimary" />
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
<import type="android.os.Build" />
|
||||
<import type="com.topjohnwu.magisk.core.Info" />
|
||||
|
||||
<import type="com.topjohnwu.magisk.BuildConfig" />
|
||||
<import type="com.topjohnwu.magisk.R" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
@@ -40,7 +40,7 @@
|
||||
android:textAppearance="@style/AppearanceFoundation.Title" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
invisibleUnless="@{viewModel.success || viewModel.failed}"
|
||||
invisible="@{viewModel.checking}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="@dimen/l1"
|
||||
@@ -49,6 +49,7 @@
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/safetynet_attestation"
|
||||
style="@style/WidgetFoundation.Card.Elevated"
|
||||
cardBackgroundColorAttr="@{viewModel.success ? R.attr.colorPrimary : R.attr.colorError}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
@@ -62,30 +63,13 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias=".35"
|
||||
app:layout_constraintWidth_max="300dp">
|
||||
app:layout_constraintWidth_max="300dp"
|
||||
tools:cardBackgroundColor="?colorPrimary">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
goneUnless="@{viewModel.failed}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:alpha=".5"
|
||||
android:background="?colorError"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
goneUnless="@{viewModel.success}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:alpha=".5"
|
||||
android:background="?colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/safetynet_title"
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -77,8 +77,11 @@
|
||||
|
||||
<com.topjohnwu.widget.IndeterminateCheckBox
|
||||
android:id="@+id/hide_expand_icon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="0dp"
|
||||
android:minHeight="0dp"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<item name="cardBackgroundColor">?colorSurfaceVariant</item>
|
||||
<item name="cardCornerRadius">@dimen/l_50</item>
|
||||
<item name="cardElevation">0dp</item>
|
||||
<item name="cardPreventCornerOverlap">true</item>
|
||||
<item name="cardPreventCornerOverlap">false</item>
|
||||
</style>
|
||||
|
||||
<style name="WidgetFoundation.Card.Primary">
|
||||
@@ -41,20 +41,18 @@
|
||||
<item name="strokeColor">?colorPrimary</item>
|
||||
</style>
|
||||
|
||||
<style name="WidgetFoundation.Card.Elevated" parent="Widget.MaterialComponents.CardView">
|
||||
<style name="WidgetFoundation.Card.Elevated">
|
||||
<item name="cardBackgroundColor">?colorSurfaceSurfaceVariant</item>
|
||||
<item name="cardCornerRadius">@dimen/l_50</item>
|
||||
<item name="cardElevation">@dimen/l_125</item>
|
||||
<item name="cardPreventCornerOverlap">true</item>
|
||||
</style>
|
||||
|
||||
<style name="WidgetFoundation.Card.OnPrimary" parent="Widget.MaterialComponents.CardView">
|
||||
<style name="WidgetFoundation.Card.OnPrimary">
|
||||
<item name="cardCornerRadius">@dimen/l_50</item>
|
||||
<item name="cardElevation">0dp</item>
|
||||
<item name="strokeColor">?colorOnPrimaryVariant</item>
|
||||
<item name="strokeWidth">1dp</item>
|
||||
<item name="cardBackgroundColor">?colorPrimary</item>
|
||||
<item name="cardPreventCornerOverlap">true</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user