mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-26 00:47:43 +00:00
Fix focus on main elements in Modern UI
Co-authored-by: John Wu <topjohnwu@gmail.com>
This commit is contained in:
parent
bd240ba48c
commit
f575155a41
@ -31,6 +31,7 @@
|
|||||||
style="@style/WidgetFoundation.Card.Elevated"
|
style="@style/WidgetFoundation.Card.Elevated"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:focusable="false"
|
||||||
app:cardElevation="@dimen/margin_generic"
|
app:cardElevation="@dimen/margin_generic"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
@ -53,9 +54,9 @@
|
|||||||
app:layout_constraintGuide_end="16dp" />
|
app:layout_constraintGuide_end="16dp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/dialog_base_icon"
|
||||||
style="@style/WidgetFoundation.Image.Big"
|
style="@style/WidgetFoundation.Image.Big"
|
||||||
gone="@{data.icon == null}"
|
gone="@{data.icon == null}"
|
||||||
android:id="@+id/dialog_base_icon"
|
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="@dimen/l1"
|
android:layout_marginTop="@dimen/l1"
|
||||||
android:src="@{data.icon}"
|
android:src="@{data.icon}"
|
||||||
@ -66,8 +67,8 @@
|
|||||||
tools:src="@drawable/ic_delete_md2" />
|
tools:src="@drawable/ic_delete_md2" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
gone="@{data.title.length == 0}"
|
|
||||||
android:id="@+id/dialog_base_title"
|
android:id="@+id/dialog_base_title"
|
||||||
|
gone="@{data.title.length == 0}"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/l1"
|
android:layout_marginTop="@dimen/l1"
|
||||||
@ -96,8 +97,8 @@
|
|||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
gone="@{data.message.length == 0}"
|
|
||||||
android:id="@+id/dialog_base_message"
|
android:id="@+id/dialog_base_message"
|
||||||
|
gone="@{data.message.length == 0}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:text="@{data.message}"
|
android:text="@{data.message}"
|
||||||
@ -127,16 +128,16 @@
|
|||||||
android:id="@+id/dialog_base_buttons"
|
android:id="@+id/dialog_base_buttons"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
android:gravity="bottom|center_horizontal"
|
android:gravity="bottom|center_horizontal"
|
||||||
android:layoutDirection="locale"
|
android:layoutDirection="locale"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingTop="4dp"
|
android:paddingTop="4dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
android:paddingBottom="4dp">
|
android:paddingBottom="4dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/dialog_base_button_4"
|
android:id="@+id/dialog_base_button_4"
|
||||||
@ -146,7 +147,9 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:clickable="@{data.buttonIDGAF.isEnabled()}"
|
||||||
android:filterTouchesWhenObscured="true"
|
android:filterTouchesWhenObscured="true"
|
||||||
|
android:focusable="@{data.buttonIDGAF.isEnabled()}"
|
||||||
android:onClick="@{() -> data.buttonIDGAF.clicked()}"
|
android:onClick="@{() -> data.buttonIDGAF.clicked()}"
|
||||||
android:text="@{data.buttonIDGAF.title}"
|
android:text="@{data.buttonIDGAF.title}"
|
||||||
app:icon="@{data.buttonIDGAF.icon}"
|
app:icon="@{data.buttonIDGAF.icon}"
|
||||||
@ -161,7 +164,9 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:clickable="@{data.buttonNeutral.isEnabled()}"
|
||||||
android:filterTouchesWhenObscured="true"
|
android:filterTouchesWhenObscured="true"
|
||||||
|
android:focusable="@{data.buttonNeutral.isEnabled()}"
|
||||||
android:onClick="@{() -> data.buttonNeutral.clicked()}"
|
android:onClick="@{() -> data.buttonNeutral.clicked()}"
|
||||||
android:text="@{data.buttonNeutral.title}"
|
android:text="@{data.buttonNeutral.title}"
|
||||||
app:icon="@{data.buttonNeutral.icon}"
|
app:icon="@{data.buttonNeutral.icon}"
|
||||||
@ -184,7 +189,9 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:clickable="@{data.buttonNegative.isEnabled()}"
|
||||||
android:filterTouchesWhenObscured="true"
|
android:filterTouchesWhenObscured="true"
|
||||||
|
android:focusable="@{data.buttonNegative.isEnabled()}"
|
||||||
android:onClick="@{() -> data.buttonNegative.clicked()}"
|
android:onClick="@{() -> data.buttonNegative.clicked()}"
|
||||||
android:text="@{data.buttonNegative.title}"
|
android:text="@{data.buttonNegative.title}"
|
||||||
app:icon="@{data.buttonNegative.icon}"
|
app:icon="@{data.buttonNegative.icon}"
|
||||||
@ -199,7 +206,9 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:clickable="@{data.buttonPositive.isEnabled()}"
|
||||||
android:filterTouchesWhenObscured="true"
|
android:filterTouchesWhenObscured="true"
|
||||||
|
android:focusable="@{data.buttonPositive.isEnabled()}"
|
||||||
android:onClick="@{() -> data.buttonPositive.clicked()}"
|
android:onClick="@{() -> data.buttonPositive.clicked()}"
|
||||||
android:text="@{data.buttonPositive.title}"
|
android:text="@{data.buttonPositive.title}"
|
||||||
app:icon="@{data.buttonPositive.icon}"
|
app:icon="@{data.buttonPositive.icon}"
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<import type="com.topjohnwu.magisk.ui.home.MagiskState" />
|
<import type="com.topjohnwu.magisk.ui.home.MagiskState" />
|
||||||
|
|
||||||
<import type="com.topjohnwu.magisk.ui.home.DeveloperItem"/>
|
<import type="com.topjohnwu.magisk.ui.home.DeveloperItem" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
@ -34,15 +34,15 @@
|
|||||||
android:paddingTop="@dimen/l1">
|
android:paddingTop="@dimen/l1">
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:layout_gravity="center"
|
|
||||||
style="@style/WidgetFoundation.Button"
|
style="@style/WidgetFoundation.Button"
|
||||||
gone="@{!viewModel.showTest}"
|
gone="@{!viewModel.showTest}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:onClick="@{() -> viewModel.onTestPressed()}"
|
android:onClick="@{() -> viewModel.onTestPressed()}"
|
||||||
android:text="TEST"
|
android:text="TEST"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
tools:visibility="gone"/>
|
tools:visibility="gone" />
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
style="@style/WidgetFoundation.Card.Primary"
|
style="@style/WidgetFoundation.Card.Primary"
|
||||||
@ -51,7 +51,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/l1"
|
android:layout_marginStart="@dimen/l1"
|
||||||
android:layout_marginEnd="@dimen/l1"
|
android:layout_marginEnd="@dimen/l1"
|
||||||
android:layout_marginBottom="@dimen/l1">
|
android:layout_marginBottom="@dimen/l1"
|
||||||
|
android:focusable="false">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -101,40 +102,40 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/l1"
|
android:layout_marginStart="@dimen/l1"
|
||||||
android:layout_marginEnd="@dimen/l1"
|
|
||||||
android:layout_marginTop="@dimen/l1"
|
android:layout_marginTop="@dimen/l1"
|
||||||
|
android:layout_marginEnd="@dimen/l1"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/home_magisk_wrapper" />
|
app:layout_constraintTop_toBottomOf="@+id/home_magisk_wrapper" />
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
|
gone="@{!viewModel.showSafetyNet && !viewModel.showUninstall}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/l1"
|
android:layout_height="@dimen/l1" />
|
||||||
gone="@{!viewModel.showSafetyNet && !viewModel.showUninstall}" />
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
style="@style/WidgetFoundation.Button.Outlined"
|
style="@style/WidgetFoundation.Button.Outlined"
|
||||||
android:layout_marginStart="@dimen/l1"
|
gone="@{!viewModel.showSafetyNet}"
|
||||||
android:layout_marginEnd="@dimen/l1"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/l1"
|
||||||
|
android:layout_marginEnd="@dimen/l1"
|
||||||
|
android:onClick="@{() -> viewModel.onSafetyNetPressed()}"
|
||||||
android:text="@string/home_check_safetynet"
|
android:text="@string/home_check_safetynet"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:onClick="@{() -> viewModel.onSafetyNetPressed()}"
|
|
||||||
gone="@{!viewModel.showSafetyNet}"
|
|
||||||
app:cornerRadius="@dimen/r1"
|
app:cornerRadius="@dimen/r1"
|
||||||
app:icon="@drawable/ic_safetynet_md2" />
|
app:icon="@drawable/ic_safetynet_md2" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
style="@style/WidgetFoundation.Button.Outlined.Error"
|
style="@style/WidgetFoundation.Button.Outlined.Error"
|
||||||
android:layout_marginStart="@dimen/l1"
|
gone="@{!viewModel.showUninstall}"
|
||||||
android:layout_marginEnd="@dimen/l1"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/l1"
|
||||||
|
android:layout_marginEnd="@dimen/l1"
|
||||||
|
android:onClick="@{() -> viewModel.onDeletePressed()}"
|
||||||
android:text="@string/uninstall_magisk_title"
|
android:text="@string/uninstall_magisk_title"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:onClick="@{() -> viewModel.onDeletePressed()}"
|
|
||||||
gone="@{!viewModel.showUninstall}"
|
|
||||||
app:cornerRadius="@dimen/r1"
|
app:cornerRadius="@dimen/r1"
|
||||||
app:icon="@drawable/ic_delete_md2" />
|
app:icon="@drawable/ic_delete_md2" />
|
||||||
|
|
||||||
@ -143,7 +144,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:layout_margin="@dimen/l1">
|
android:layout_margin="@dimen/l1"
|
||||||
|
android:focusable="false">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -169,20 +171,20 @@
|
|||||||
android:textAppearance="@style/AppearanceFoundation.Caption.Variant" />
|
android:textAppearance="@style/AppearanceFoundation.Caption.Variant" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
|
item="@{DeveloperItem.Main.INSTANCE}"
|
||||||
layout="@layout/item_developer"
|
layout="@layout/item_developer"
|
||||||
|
viewModel="@{viewModel}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/l_50"
|
android:layout_marginTop="@dimen/l_50" />
|
||||||
viewModel="@{viewModel}"
|
|
||||||
item="@{DeveloperItem.Main.INSTANCE}" />
|
|
||||||
|
|
||||||
<include
|
<include
|
||||||
|
item="@{DeveloperItem.App.INSTANCE}"
|
||||||
layout="@layout/item_developer"
|
layout="@layout/item_developer"
|
||||||
|
viewModel="@{viewModel}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/l_50"
|
android:layout_marginTop="@dimen/l_50" />
|
||||||
viewModel="@{viewModel}"
|
|
||||||
item="@{DeveloperItem.App.INSTANCE}" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<data>
|
<data>
|
||||||
|
|
||||||
<import type="com.topjohnwu.magisk.core.Info" />
|
<import type="com.topjohnwu.magisk.core.Info" />
|
||||||
|
|
||||||
<import type="com.topjohnwu.magisk.core.Config" />
|
<import type="com.topjohnwu.magisk.core.Config" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
@ -36,12 +37,13 @@
|
|||||||
android:paddingTop="@dimen/l1">
|
android:paddingTop="@dimen/l1">
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
gone="@{viewModel.skipOptions}"
|
|
||||||
style="@style/WidgetFoundation.Card"
|
style="@style/WidgetFoundation.Card"
|
||||||
|
gone="@{viewModel.skipOptions}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/l1"
|
android:layout_marginStart="@dimen/l1"
|
||||||
android:layout_marginEnd="@dimen/l1" >
|
android:layout_marginEnd="@dimen/l1"
|
||||||
|
android:focusable="false">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -63,11 +65,11 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="@dimen/l1"
|
android:layout_marginStart="@dimen/l1"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:text="@string/install_options_title"
|
android:text="@string/install_options_title"
|
||||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
style="@style/WidgetFoundation.Button.Text"
|
style="@style/WidgetFoundation.Button.Text"
|
||||||
@ -83,16 +85,17 @@
|
|||||||
gone="@{viewModel.step != 0}"
|
gone="@{viewModel.step != 0}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingStart="3dp"
|
|
||||||
android:paddingEnd="3dp"
|
|
||||||
android:layout_marginStart="@dimen/l1"
|
android:layout_marginStart="@dimen/l1"
|
||||||
android:layout_marginTop="@dimen/l_50"
|
android:layout_marginTop="@dimen/l_50"
|
||||||
android:layout_marginEnd="@dimen/l1"
|
android:layout_marginEnd="@dimen/l1"
|
||||||
android:layout_marginBottom="@dimen/l_50"
|
android:layout_marginBottom="@dimen/l_50"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingStart="3dp"
|
||||||
|
android:paddingEnd="3dp"
|
||||||
tools:layout_gravity="center">
|
tools:layout_gravity="center">
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
|
style="@style/WidgetFoundation.Checkbox"
|
||||||
gone="@{Info.isSAR}"
|
gone="@{Info.isSAR}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -101,6 +104,7 @@
|
|||||||
tools:checked="true" />
|
tools:checked="true" />
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
|
style="@style/WidgetFoundation.Checkbox"
|
||||||
gone="@{Info.isFBE}"
|
gone="@{Info.isFBE}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -109,6 +113,7 @@
|
|||||||
app:tint="?colorPrimary" />
|
app:tint="?colorPrimary" />
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
|
style="@style/WidgetFoundation.Checkbox"
|
||||||
gone="@{Info.ramdisk}"
|
gone="@{Info.ramdisk}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -128,7 +133,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/l1"
|
android:layout_marginStart="@dimen/l1"
|
||||||
android:layout_marginTop="@dimen/l1"
|
android:layout_marginTop="@dimen/l1"
|
||||||
android:layout_marginEnd="@dimen/l1" >
|
android:layout_marginEnd="@dimen/l1"
|
||||||
|
android:focusable="false">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -150,11 +156,11 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginStart="@dimen/l1"
|
android:layout_marginStart="@dimen/l1"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:text="@string/install_method_title"
|
android:text="@string/install_method_title"
|
||||||
android:textAppearance="@style/AppearanceFoundation.Body"
|
android:textAppearance="@style/AppearanceFoundation.Body"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold" />
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:layout_weight="1"/>
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
style="@style/WidgetFoundation.Button.Text"
|
style="@style/WidgetFoundation.Button.Text"
|
||||||
@ -165,7 +171,7 @@
|
|||||||
android:onClick="@{() -> viewModel.install()}"
|
android:onClick="@{() -> viewModel.install()}"
|
||||||
android:text="@string/install_start"
|
android:text="@string/install_start"
|
||||||
app:icon="@drawable/ic_forth_md2"
|
app:icon="@drawable/ic_forth_md2"
|
||||||
app:iconGravity="textEnd"/>
|
app:iconGravity="textEnd" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@ -183,6 +189,7 @@
|
|||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/method_download"
|
android:id="@+id/method_download"
|
||||||
|
style="@style/WidgetFoundation.RadioButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/download_zip_only"
|
android:text="@string/download_zip_only"
|
||||||
@ -190,12 +197,14 @@
|
|||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/method_patch"
|
android:id="@+id/method_patch"
|
||||||
|
style="@style/WidgetFoundation.RadioButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/select_patch_file" />
|
android:text="@string/select_patch_file" />
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/method_direct"
|
android:id="@+id/method_direct"
|
||||||
|
style="@style/WidgetFoundation.RadioButton"
|
||||||
gone="@{!viewModel.rooted}"
|
gone="@{!viewModel.rooted}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -203,6 +212,7 @@
|
|||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/method_inactive_slot"
|
android:id="@+id/method_inactive_slot"
|
||||||
|
style="@style/WidgetFoundation.RadioButton"
|
||||||
gone="@{!viewModel.isRooted || !Info.isAB}"
|
gone="@{!viewModel.isRooted || !Info.isAB}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -218,21 +228,21 @@
|
|||||||
style="@style/WidgetFoundation.Card"
|
style="@style/WidgetFoundation.Card"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/l1"
|
|
||||||
android:layout_marginStart="@dimen/l1"
|
android:layout_marginStart="@dimen/l1"
|
||||||
android:layout_marginEnd="@dimen/l1" >
|
android:layout_marginEnd="@dimen/l1"
|
||||||
|
android:focusable="false">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/release_notes"
|
android:id="@+id/release_notes"
|
||||||
|
markdownText="@{viewModel.notes}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="15dp"
|
android:layout_margin="15dp"
|
||||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
markdownText="@{viewModel.notes}"
|
tools:maxLines="5"
|
||||||
tools:visibility="visible"
|
|
||||||
tools:text="@tools:sample/lorem/random"
|
tools:text="@tools:sample/lorem/random"
|
||||||
tools:maxLines="5" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
@ -47,10 +47,13 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@+id/hide_filter_title_filter">
|
app:layout_constraintTop_toBottomOf="@+id/hide_filter_title_filter">
|
||||||
|
|
||||||
<com.google.android.material.chip.Chip
|
<com.google.android.material.chip.Chip
|
||||||
|
android:id="@+id/hide_filter_chip"
|
||||||
style="@style/Widget.MaterialComponents.Chip.Filter"
|
style="@style/Widget.MaterialComponents.Chip.Filter"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:checked="@={viewModel.showSystem}"
|
android:checked="@={viewModel.showSystem}"
|
||||||
|
android:nextFocusRight="@id/hide_filter_chip_data"
|
||||||
|
android:nextFocusDown="@id/hide_filter_search_field"
|
||||||
android:text="@string/show_system_app"
|
android:text="@string/show_system_app"
|
||||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||||
app:checkedIcon="@drawable/ic_check_md2"
|
app:checkedIcon="@drawable/ic_check_md2"
|
||||||
@ -58,12 +61,15 @@
|
|||||||
tools:checked="true" />
|
tools:checked="true" />
|
||||||
|
|
||||||
<com.google.android.material.chip.Chip
|
<com.google.android.material.chip.Chip
|
||||||
|
android:id="@+id/hide_filter_chip_data"
|
||||||
style="@style/Widget.MaterialComponents.Chip.Entry"
|
style="@style/Widget.MaterialComponents.Chip.Entry"
|
||||||
gone="@{viewModel.query.empty}"
|
gone="@{viewModel.query.empty}"
|
||||||
onCloseClicked="@{() -> viewModel.resetQuery()}"
|
onCloseClicked="@{() -> viewModel.resetQuery()}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:checkable="false"
|
android:checkable="false"
|
||||||
|
android:nextFocusRight="@id/hide_filter_done"
|
||||||
|
android:nextFocusDown="@id/hide_filter_search_field"
|
||||||
android:text="@{viewModel.query}"
|
android:text="@{viewModel.query}"
|
||||||
android:textAppearance="@style/AppearanceFoundation.Caption"
|
android:textAppearance="@style/AppearanceFoundation.Caption"
|
||||||
app:chipBackgroundColor="?colorSurfaceVariant" />
|
app:chipBackgroundColor="?colorSurfaceVariant" />
|
||||||
@ -106,14 +112,16 @@
|
|||||||
app:tint="?colorDisabled" />
|
app:tint="?colorDisabled" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
android:id="@+id/hide_filter_search_field"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="48dp"
|
android:layout_marginStart="48dp"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
|
android:gravity="start|center_vertical"
|
||||||
android:hint="@string/hide_filter_hint"
|
android:hint="@string/hide_filter_hint"
|
||||||
android:inputType="textUri"
|
android:inputType="textUri"
|
||||||
android:minHeight="36dp"
|
android:minHeight="36dp"
|
||||||
android:gravity="start|center_vertical"
|
android:nextFocusRight="@id/hide_filter_done"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="@dimen/l1"
|
android:paddingEnd="@dimen/l1"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
@ -128,14 +136,15 @@
|
|||||||
android:id="@+id/hide_filter_done"
|
android:id="@+id/hide_filter_done"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:nextFocusLeft="@id/hide_filter_chip"
|
||||||
app:backgroundTint="?colorPrimary"
|
app:backgroundTint="?colorPrimary"
|
||||||
app:tint="?colorOnPrimary"
|
|
||||||
app:elevation="0dp"
|
app:elevation="0dp"
|
||||||
app:fabSize="mini"
|
app:fabSize="mini"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/hide_filter_search"
|
app:layout_constraintBottom_toBottomOf="@+id/hide_filter_search"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="@+id/hide_filter_search"
|
app:layout_constraintTop_toTopOf="@+id/hide_filter_search"
|
||||||
app:srcCompat="@drawable/ic_check_md2" />
|
app:srcCompat="@drawable/ic_check_md2"
|
||||||
|
app:tint="?colorOnPrimary" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
@ -18,13 +18,14 @@
|
|||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
style="@style/WidgetFoundation.Card"
|
style="@style/WidgetFoundation.Card"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:focusable="false">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="@dimen/l_50"
|
|
||||||
android:paddingStart="@dimen/l1"
|
android:paddingStart="@dimen/l1"
|
||||||
|
android:paddingTop="@dimen/l_50"
|
||||||
android:paddingEnd="@dimen/l1"
|
android:paddingEnd="@dimen/l1"
|
||||||
android:paddingBottom="@dimen/l_50"
|
android:paddingBottom="@dimen/l_50"
|
||||||
tools:layout_gravity="center">
|
tools:layout_gravity="center">
|
||||||
@ -105,7 +106,7 @@
|
|||||||
android:id="@+id/home_magisk_latest_version"
|
android:id="@+id/home_magisk_latest_version"
|
||||||
style="@style/W.Home.Item.Top"
|
style="@style/W.Home.Item.Top"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" >
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/W.Home.ItemContent"
|
style="@style/W.Home.ItemContent"
|
||||||
|
@ -18,13 +18,14 @@
|
|||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
style="@style/WidgetFoundation.Card"
|
style="@style/WidgetFoundation.Card"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:focusable="false">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="@dimen/l_50"
|
|
||||||
android:paddingStart="@dimen/l1"
|
android:paddingStart="@dimen/l1"
|
||||||
|
android:paddingTop="@dimen/l_50"
|
||||||
android:paddingEnd="@dimen/l1"
|
android:paddingEnd="@dimen/l1"
|
||||||
android:paddingBottom="@dimen/l_50"
|
android:paddingBottom="@dimen/l_50"
|
||||||
tools:layout_gravity="center">
|
tools:layout_gravity="center">
|
||||||
@ -106,7 +107,7 @@
|
|||||||
android:id="@+id/home_manager_latest_version"
|
android:id="@+id/home_manager_latest_version"
|
||||||
style="@style/W.Home.Item.Top"
|
style="@style/W.Home.Item.Top"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" >
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/W.Home.ItemContent"
|
style="@style/W.Home.ItemContent"
|
||||||
|
@ -87,6 +87,7 @@
|
|||||||
app:tint="?colorDisabled" />
|
app:tint="?colorDisabled" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
android:id="@+id/module_filter_search_field"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="48dp"
|
android:layout_marginStart="48dp"
|
||||||
@ -94,6 +95,7 @@
|
|||||||
android:hint="@string/hide_filter_hint"
|
android:hint="@string/hide_filter_hint"
|
||||||
android:inputType="textUri"
|
android:inputType="textUri"
|
||||||
android:minHeight="36dp"
|
android:minHeight="36dp"
|
||||||
|
android:nextFocusRight="@id/module_filter_done"
|
||||||
android:paddingStart="0dp"
|
android:paddingStart="0dp"
|
||||||
android:paddingEnd="@dimen/l1"
|
android:paddingEnd="@dimen/l1"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
@ -109,6 +111,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/l1"
|
android:layout_marginEnd="@dimen/l1"
|
||||||
|
android:nextFocusLeft="@id/module_filter_search_field"
|
||||||
app:backgroundTint="?colorPrimary"
|
app:backgroundTint="?colorPrimary"
|
||||||
app:elevation="0dp"
|
app:elevation="0dp"
|
||||||
app:fabSize="mini"
|
app:fabSize="mini"
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
style="@style/WidgetFoundation.Card"
|
style="@style/WidgetFoundation.Card"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:focusable="false"
|
||||||
tools:layout_gravity="center"
|
tools:layout_gravity="center"
|
||||||
tools:layout_marginBottom="@dimen/l1">
|
tools:layout_marginBottom="@dimen/l1">
|
||||||
|
|
||||||
@ -30,9 +31,11 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/hide_expand"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?selectableItemBackground"
|
android:background="?selectableItemBackground"
|
||||||
|
android:nextFocusRight="@id/hide_expand_icon"
|
||||||
android:onClick="@{item::toggleExpand}">
|
android:onClick="@{item::toggleExpand}">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@ -77,15 +80,16 @@
|
|||||||
|
|
||||||
<com.topjohnwu.widget.IndeterminateCheckBox
|
<com.topjohnwu.widget.IndeterminateCheckBox
|
||||||
android:id="@+id/hide_expand_icon"
|
android:id="@+id/hide_expand_icon"
|
||||||
|
state="@={item.hiddenState}"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/l1"
|
||||||
android:minWidth="0dp"
|
android:minWidth="0dp"
|
||||||
android:minHeight="0dp"
|
android:minHeight="0dp"
|
||||||
android:layout_marginEnd="@dimen/l1"
|
android:nextFocusLeft="@id/hide_expand"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
state="@={item.hiddenState}"/>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
@ -105,9 +109,9 @@
|
|||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
style="@style/WidgetFoundation.ProgressBar"
|
style="@style/WidgetFoundation.ProgressBar"
|
||||||
|
gone="@{item.checkedPercent == 0}"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_gravity="top"
|
android:layout_gravity="top"
|
||||||
gone="@{item.checkedPercent == 0}"
|
|
||||||
android:progress="@{item.checkedPercent}" />
|
android:progress="@{item.checkedPercent}" />
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?selectableItemBackgroundBorderless"
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
android:minWidth="60dp"
|
android:minWidth="60dp"
|
||||||
android:onClick="@{() -> viewModel.onLinkPressed(item.link)}"
|
android:onClick="@{() -> viewModel.onLinkPressed(item.link)}"
|
||||||
android:padding="@dimen/l_50"
|
android:padding="@dimen/l_50"
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="?selectableItemBackground"
|
android:background="?selectableItemBackground"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
android:onClick="@{() -> listener.onClick(item.position)}"
|
android:onClick="@{() -> listener.onClick(item.position)}"
|
||||||
android:paddingStart="@dimen/l1"
|
android:paddingStart="@dimen/l1"
|
||||||
android:paddingTop="@dimen/l_75"
|
android:paddingTop="@dimen/l_75"
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:alpha="@{item.enabled ? 1f : .5f}"
|
android:alpha="@{item.enabled ? 1f : .5f}"
|
||||||
|
android:nextFocusRight="@id/module_indicator"
|
||||||
tools:layout_gravity="center"
|
tools:layout_gravity="center"
|
||||||
tools:layout_margin="@dimen/l1">
|
tools:layout_margin="@dimen/l1">
|
||||||
|
|
||||||
@ -83,10 +84,10 @@
|
|||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:id="@+id/module_indicator"
|
android:id="@+id/module_indicator"
|
||||||
android:checked="@={item.enabled}"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/l_50"
|
android:layout_marginEnd="@dimen/l_50"
|
||||||
|
android:checked="@={item.enabled}"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/module_version_author"
|
app:layout_constraintBottom_toBottomOf="@+id/module_version_author"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="1"
|
app:layout_constraintHorizontal_bias="1"
|
||||||
@ -122,6 +123,8 @@
|
|||||||
gone="@{item.repo == null}"
|
gone="@{item.repo == null}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:alpha=".5"
|
android:alpha=".5"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
android:onClick="@{() -> viewModel.infoPressed(item)}"
|
android:onClick="@{() -> viewModel.infoPressed(item)}"
|
||||||
android:paddingEnd="@dimen/l_50"
|
android:paddingEnd="@dimen/l_50"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/module_remove"
|
app:layout_constraintBottom_toBottomOf="@+id/module_remove"
|
||||||
@ -134,6 +137,8 @@
|
|||||||
style="@style/WidgetFoundation.Button.Text"
|
style="@style/WidgetFoundation.Button.Text"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
android:onClick="@{() -> item.delete(viewModel)}"
|
android:onClick="@{() -> item.delete(viewModel)}"
|
||||||
android:text="@{item.removed ? @string/module_state_restore : @string/module_state_remove}"
|
android:text="@{item.removed ? @string/module_state_restore : @string/module_state_remove}"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
|
@ -18,9 +18,14 @@
|
|||||||
</data>
|
</data>
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/module_card"
|
||||||
style="@style/WidgetFoundation.Card"
|
style="@style/WidgetFoundation.Card"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:nextFocusRight="@id/module_info"
|
||||||
|
android:onClick="@{() -> viewModel.downloadPressed(item)}"
|
||||||
tools:layout_gravity="center"
|
tools:layout_gravity="center"
|
||||||
tools:layout_marginBottom="@dimen/l1"
|
tools:layout_marginBottom="@dimen/l1"
|
||||||
tools:layout_marginEnd="@dimen/l1">
|
tools:layout_marginEnd="@dimen/l1">
|
||||||
@ -96,6 +101,7 @@
|
|||||||
style="@style/WidgetFoundation.Icon"
|
style="@style/WidgetFoundation.Icon"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:alpha=".5"
|
android:alpha=".5"
|
||||||
|
android:nextFocusLeft="@id/module_card"
|
||||||
android:onClick="@{() -> viewModel.infoPressed(item)}"
|
android:onClick="@{() -> viewModel.infoPressed(item)}"
|
||||||
android:paddingEnd="@dimen/l_50"
|
android:paddingEnd="@dimen/l_50"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/module_download"
|
app:layout_constraintBottom_toBottomOf="@+id/module_download"
|
||||||
@ -105,16 +111,17 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/module_download"
|
android:id="@+id/module_download"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
style="@style/WidgetFoundation.Icon.Primary"
|
style="@style/WidgetFoundation.Icon.Primary"
|
||||||
android:paddingStart="@dimen/l_50"
|
|
||||||
isEnabled="@{!(item.progress == -100 || (item.progress > 0 && item.progress < 100))}"
|
isEnabled="@{!(item.progress == -100 || (item.progress > 0 && item.progress < 100))}"
|
||||||
android:contentDescription="@string/download"
|
|
||||||
srcCompat="@{item.isUpdate ? R.drawable.ic_update_md2 : R.drawable.ic_download_md2}"
|
srcCompat="@{item.isUpdate ? R.drawable.ic_update_md2 : R.drawable.ic_download_md2}"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:contentDescription="@string/download"
|
||||||
|
android:nextFocusLeft="@id/module_info"
|
||||||
|
android:onClick="@{() -> viewModel.downloadPressed(item)}"
|
||||||
|
android:paddingStart="@dimen/l_50"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/module_divider"
|
app:layout_constraintTop_toBottomOf="@+id/module_divider"
|
||||||
android:onClick="@{() -> viewModel.downloadPressed(item)}"
|
|
||||||
tools:srcCompat="@drawable/ic_download_md2" />
|
tools:srcCompat="@drawable/ic_download_md2" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
@ -21,14 +21,16 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:alpha="@{item.enabled ? 1f : .5f}"
|
android:alpha="@{item.enabled ? 1f : .5f}"
|
||||||
|
android:clickable="@{item.enabled}"
|
||||||
|
android:focusable="@{item.enabled}"
|
||||||
android:onClick="@{(view) -> item.onPressed(view, callback)}"
|
android:onClick="@{(view) -> item.onPressed(view, callback)}"
|
||||||
tools:layout_gravity="center">
|
tools:layout_gravity="center">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:paddingStart="@{item.icon == 0 ? @dimen/l1 : 0}"
|
android:paddingStart="@{item.icon == 0 ? @dimen/l1 : 0}"
|
||||||
android:paddingEnd="@dimen/l1">
|
android:paddingEnd="@dimen/l1">
|
||||||
|
|
||||||
@ -41,9 +43,9 @@
|
|||||||
tools:srcCompat="@drawable/ic_fingerprint" />
|
tools:srcCompat="@drawable/ic_fingerprint" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingTop="@dimen/l1"
|
android:paddingTop="@dimen/l1"
|
||||||
@ -73,12 +75,13 @@
|
|||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:id="@+id/selector_indicator"
|
android:id="@+id/selector_indicator"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:checked="@{item.checked}"
|
|
||||||
android:onCheckedChanged="@{(v, c) -> item.onToggle(v, callback, c)}"
|
|
||||||
goneUnless="@{item.showSwitch}"
|
goneUnless="@{item.showSwitch}"
|
||||||
isEnabled="@{item.enabled}"/>
|
isEnabled="@{item.enabled}"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="@{item.checked}"
|
||||||
|
android:focusable="@{item.enabled}"
|
||||||
|
android:onCheckedChanged="@{(v, c) -> item.onToggle(v, callback, c)}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<style name="WidgetFoundation.Card" parent="Widget.MaterialComponents.CardView">
|
<style name="WidgetFoundation.Card" parent="Widget.MaterialComponents.CardView">
|
||||||
|
<item name="android:focusable">auto</item>
|
||||||
<item name="cardBackgroundColor">?colorSurfaceVariant</item>
|
<item name="cardBackgroundColor">?colorSurfaceVariant</item>
|
||||||
<item name="cardCornerRadius">@dimen/l_50</item>
|
<item name="cardCornerRadius">@dimen/l_50</item>
|
||||||
<item name="cardElevation">0dp</item>
|
<item name="cardElevation">0dp</item>
|
||||||
@ -154,6 +155,16 @@
|
|||||||
<item name="tint">@color/color_error_transient</item>
|
<item name="tint">@color/color_error_transient</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="WidgetFoundation.Checkbox" parent="Widget.AppCompat.CompoundButton.CheckBox">
|
||||||
|
<item name="android:paddingStart">@dimen/l1</item>
|
||||||
|
<item name="android:paddingEnd">@dimen/l1</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="WidgetFoundation.RadioButton" parent="Widget.AppCompat.CompoundButton.RadioButton">
|
||||||
|
<item name="android:paddingStart">@dimen/l1</item>
|
||||||
|
<item name="android:paddingEnd">@dimen/l1</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="WidgetFoundation.ProgressBar" parent="Widget.AppCompat.ProgressBar.Horizontal">
|
<style name="WidgetFoundation.ProgressBar" parent="Widget.AppCompat.ProgressBar.Horizontal">
|
||||||
<item name="android:indeterminate">false</item>
|
<item name="android:indeterminate">false</item>
|
||||||
<item name="android:layout_height">4dp</item>
|
<item name="android:layout_height">4dp</item>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user