2019-10-22 16:29:01 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2019-10-22 20:46:09 +02:00
|
|
|
<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">
|
2019-10-22 16:29:01 +02:00
|
|
|
|
|
|
|
<data>
|
|
|
|
|
2020-08-24 00:19:08 -07:00
|
|
|
<import type="com.topjohnwu.magisk.core.Info" />
|
2020-09-21 13:27:29 +03:00
|
|
|
|
2020-08-24 04:04:52 -07:00
|
|
|
<import type="com.topjohnwu.magisk.core.Config" />
|
2020-08-24 00:19:08 -07:00
|
|
|
|
2021-12-15 03:37:52 +08:00
|
|
|
<import type="android.os.Build" />
|
|
|
|
|
2019-10-22 16:29:01 +02:00
|
|
|
<variable
|
|
|
|
name="viewModel"
|
2020-01-13 00:43:09 +08:00
|
|
|
type="com.topjohnwu.magisk.ui.install.InstallViewModel" />
|
2019-10-22 16:29:01 +02:00
|
|
|
|
|
|
|
</data>
|
|
|
|
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2019-10-22 20:46:09 +02:00
|
|
|
android:clipToPadding="false"
|
|
|
|
android:fillViewport="true"
|
2020-10-23 12:58:39 +08:00
|
|
|
android:paddingTop="@dimen/internal_action_bar_size"
|
|
|
|
android:paddingBottom="@dimen/l2"
|
|
|
|
app:fitsSystemWindowsInsets="top|bottom"
|
2019-10-22 20:46:09 +02:00
|
|
|
tools:paddingTop="24dp">
|
2019-10-22 16:29:01 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
<LinearLayout
|
2019-10-22 16:29:01 +02:00
|
|
|
android:layout_width="match_parent"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:clipToPadding="false"
|
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingTop="@dimen/l_50">
|
|
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
style="@style/WidgetFoundation.Card"
|
2021-12-15 03:37:52 +08:00
|
|
|
gone="@{viewModel.skipOptions || Info.isEmulator}"
|
2019-10-22 20:46:09 +02:00
|
|
|
android:layout_width="match_parent"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:focusable="false">
|
|
|
|
|
|
|
|
<LinearLayout
|
2019-10-22 20:46:09 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:orientation="vertical">
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
<LinearLayout
|
2019-10-22 20:46:09 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:orientation="horizontal">
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
<ImageView
|
|
|
|
style="@style/WidgetFoundation.Icon"
|
|
|
|
isSelected="@{viewModel.step > 0}"
|
|
|
|
android:layout_marginStart="@dimen/l_25"
|
|
|
|
app:srcCompat="@drawable/ic_check_circle_md2" />
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
android:text="@string/install_options_title"
|
|
|
|
android:textAppearance="@style/AppearanceFoundation.Body"
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
<Button
|
|
|
|
style="@style/WidgetFoundation.Button.Text"
|
2019-10-25 19:13:54 +02:00
|
|
|
gone="@{viewModel.step != 0}"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:layout_width="wrap_content"
|
2020-03-30 16:17:33 +02:00
|
|
|
android:layout_height="wrap_content"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:onClick="@{() -> viewModel.step(1)}"
|
|
|
|
android:text="@string/install_next" />
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
</LinearLayout>
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
<LinearLayout
|
2021-01-22 02:28:53 -08:00
|
|
|
gone="@{viewModel.step != 0}"
|
2019-10-22 20:46:09 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginTop="@dimen/l_50"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:layout_marginBottom="@dimen/l_50"
|
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingStart="3dp"
|
|
|
|
android:paddingEnd="3dp"
|
|
|
|
tools:layout_gravity="center">
|
|
|
|
|
|
|
|
<CheckBox
|
|
|
|
style="@style/WidgetFoundation.Checkbox"
|
|
|
|
gone="@{Info.isSAR}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:checked="@={Config.keepVerity}"
|
|
|
|
android:text="@string/keep_dm_verity"
|
|
|
|
tools:checked="true" />
|
2019-10-25 19:13:54 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
<CheckBox
|
|
|
|
style="@style/WidgetFoundation.Checkbox"
|
|
|
|
goneUnless="@{Info.isFDE}"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:layout_width="match_parent"
|
2019-10-22 20:46:09 +02:00
|
|
|
android:layout_height="wrap_content"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:checked="@={Config.keepEnc}"
|
|
|
|
android:text="@string/keep_force_encryption"
|
|
|
|
app:tint="?colorPrimary" />
|
|
|
|
|
|
|
|
<CheckBox
|
|
|
|
style="@style/WidgetFoundation.Checkbox"
|
2021-12-15 03:37:52 +08:00
|
|
|
goneUnless="@{!Info.vbmeta && Build.VERSION.SDK_INT >= 30}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:checked="@={Config.patchVbmeta}"
|
|
|
|
android:text="@string/patch_vbmeta"
|
|
|
|
app:tint="?colorPrimary" />
|
|
|
|
|
|
|
|
<CheckBox
|
|
|
|
style="@style/WidgetFoundation.Checkbox"
|
2021-01-22 02:28:53 -08:00
|
|
|
gone="@{Info.ramdisk}"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:layout_width="match_parent"
|
2019-10-22 20:46:09 +02:00
|
|
|
android:layout_height="wrap_content"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:checked="@={Config.recovery}"
|
|
|
|
android:text="@string/recovery_mode"
|
|
|
|
app:tint="?colorPrimary" />
|
2019-10-25 19:13:54 +02:00
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
</LinearLayout>
|
2019-10-25 19:13:54 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
</com.google.android.material.card.MaterialCardView>
|
2020-07-04 02:55:19 -07:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
style="@style/WidgetFoundation.Card"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:layout_width="match_parent"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:layout_height="wrap_content"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:layout_marginStart="@dimen/l1"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:layout_marginTop="@dimen/l1"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:layout_marginEnd="@dimen/l1"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:focusable="false">
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
<LinearLayout
|
2019-10-25 19:13:54 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:orientation="vertical">
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:orientation="horizontal">
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
<ImageView
|
|
|
|
style="@style/WidgetFoundation.Icon"
|
|
|
|
isSelected="@{viewModel.step > 1}"
|
|
|
|
android:layout_marginStart="@dimen/l_25"
|
|
|
|
app:srcCompat="@drawable/ic_check_circle_md2" />
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
<TextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
android:text="@string/install_method_title"
|
|
|
|
android:textAppearance="@style/AppearanceFoundation.Body"
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
<Button
|
|
|
|
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"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:onClick="@{() -> viewModel.install()}"
|
|
|
|
android:text="@string/install_start"
|
|
|
|
app:icon="@drawable/ic_forth_md2"
|
|
|
|
app:iconGravity="textEnd" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
<RadioGroup
|
|
|
|
gone="@{viewModel.step != 1}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginTop="@dimen/l_50"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:layout_marginBottom="@dimen/l_50"
|
|
|
|
android:checkedButton="@={viewModel.method}"
|
|
|
|
android:paddingStart="3dp"
|
|
|
|
android:paddingEnd="3dp">
|
|
|
|
|
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/method_patch"
|
|
|
|
style="@style/WidgetFoundation.RadioButton"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/select_patch_file" />
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/method_direct"
|
|
|
|
style="@style/WidgetFoundation.RadioButton"
|
|
|
|
gone="@{!viewModel.rooted}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/direct_install" />
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
<RadioButton
|
|
|
|
android:id="@+id/method_inactive_slot"
|
|
|
|
style="@style/WidgetFoundation.RadioButton"
|
|
|
|
gone="@{viewModel.noSecondSlot}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/install_inactive_slot" />
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
</RadioGroup>
|
2020-03-30 16:17:33 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
</LinearLayout>
|
2020-03-30 16:17:33 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
</com.google.android.material.card.MaterialCardView>
|
2020-03-30 16:17:33 +02:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
style="@style/WidgetFoundation.Card"
|
2021-01-24 06:55:43 -08:00
|
|
|
gone="@{viewModel.notes.empty}"
|
2020-10-15 02:10:17 +08:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:layout_marginTop="@dimen/l1"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:focusable="false">
|
2020-10-15 02:10:17 +08:00
|
|
|
|
|
|
|
<TextView
|
2021-01-22 02:28:53 -08:00
|
|
|
android:id="@+id/release_notes"
|
|
|
|
markdownText="@{viewModel.notes}"
|
2020-10-15 02:10:17 +08:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2021-01-22 02:28:53 -08:00
|
|
|
android:layout_margin="15dp"
|
|
|
|
android:textAppearance="@style/AppearanceFoundation.Caption"
|
|
|
|
android:visibility="gone"
|
|
|
|
tools:maxLines="5"
|
|
|
|
tools:text="@tools:sample/lorem/random"
|
|
|
|
tools:visibility="visible" />
|
2020-10-15 02:10:17 +08:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
</com.google.android.material.card.MaterialCardView>
|
2020-10-15 02:10:17 +08:00
|
|
|
|
2021-01-22 02:28:53 -08:00
|
|
|
</LinearLayout>
|
2019-10-22 16:29:01 +02:00
|
|
|
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
|
2020-01-13 00:43:09 +08:00
|
|
|
</layout>
|