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>
|
|
|
|
|
|
|
|
<variable
|
|
|
|
name="viewModel"
|
2019-10-25 19:13:54 +02:00
|
|
|
type="com.topjohnwu.magisk.redesign.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"
|
|
|
|
android:paddingTop="@{viewModel.insets.top + (int) @dimen/internal_action_bar_size}"
|
|
|
|
android:paddingBottom="@{viewModel.insets.bottom + (int) @dimen/l2}"
|
|
|
|
tools:paddingTop="24dp">
|
2019-10-22 16:29:01 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
<FrameLayout
|
2019-10-22 16:29:01 +02:00
|
|
|
android:layout_width="match_parent"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:layout_height="wrap_content">
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
<LinearLayout
|
|
|
|
goneUnless="@{viewModel.loaded}"
|
2019-10-22 20:46:09 +02:00
|
|
|
android:layout_width="match_parent"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:clipToPadding="false"
|
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingTop="@dimen/l1">
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
<com.google.android.material.card.MaterialCardView
|
2019-10-26 17:40:29 +02:00
|
|
|
style="?styleCardVariant"
|
2019-10-22 20:46:09 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
2019-10-26 17:40:29 +02:00
|
|
|
app:strokeWidth="@{viewModel.step != 0 ? 0f : @dimen/l_125}">
|
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"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:orientation="vertical">
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
2019-10-22 20:46:09 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:minHeight="?listPreferredItemHeightSmall">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
|
|
android:id="@+id/install_step_options_icon"
|
|
|
|
style="?styleIconNormal"
|
|
|
|
isSelected="@{viewModel.step > 0}"
|
|
|
|
android:layout_marginStart="@dimen/l_25"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
app:srcCompat="@drawable/ic_check_circle_md2" />
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:id="@+id/install_step_options_title"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:gravity="start"
|
2019-10-25 19:17:13 +02:00
|
|
|
android:text="@string/install_options_title"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:textAppearance="?appearanceTextBodyNormal"
|
|
|
|
android:textStyle="bold"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toStartOf="@+id/install_step_options_button"
|
|
|
|
app:layout_constraintStart_toEndOf="@+id/install_step_options_icon"
|
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
|
|
android:id="@+id/install_step_options_button"
|
|
|
|
style="?styleButtonText"
|
|
|
|
gone="@{viewModel.step != 0}"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:onClick="@{() -> viewModel.step(1)}"
|
2019-10-25 19:17:13 +02:00
|
|
|
android:text="@string/install_next"
|
2019-10-25 19:13:54 +02:00
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
|
|
<FrameLayout
|
|
|
|
gone="@{viewModel.step != 0}"
|
|
|
|
android:layout_width="match_parent"
|
2019-11-01 19:15:05 +01:00
|
|
|
android:paddingStart="3dp"
|
|
|
|
android:paddingEnd="3dp"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:layout_height="wrap_content">
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
<include
|
|
|
|
layout="@layout/include_install_options"
|
|
|
|
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" />
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
</FrameLayout>
|
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
|
|
|
</com.google.android.material.card.MaterialCardView>
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
<com.google.android.material.card.MaterialCardView
|
2019-10-26 17:40:29 +02:00
|
|
|
style="?styleCardVariant"
|
2019-10-22 20:46:09 +02:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginTop="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
2019-10-26 17:40:29 +02:00
|
|
|
app:strokeWidth="@{viewModel.step != 1 ? 0f : @dimen/l_125}">
|
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"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
android:layout_width="match_parent"
|
2019-10-22 20:46:09 +02:00
|
|
|
android:layout_height="wrap_content"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:minHeight="?listPreferredItemHeightSmall">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
|
|
android:id="@+id/install_step_method_icon"
|
|
|
|
style="?styleIconNormal"
|
|
|
|
isSelected="@{viewModel.step > 1}"
|
|
|
|
android:layout_marginStart="@dimen/l_25"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
app:srcCompat="@drawable/ic_check_circle_md2" />
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:id="@+id/install_step_method_title"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:gravity="start"
|
2019-10-25 19:17:13 +02:00
|
|
|
android:text="@string/install_method_title"
|
2019-10-25 19:13:54 +02:00
|
|
|
android:textAppearance="?appearanceTextBodyNormal"
|
|
|
|
android:textStyle="bold"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toStartOf="@+id/install_step_method_button"
|
|
|
|
app:layout_constraintStart_toEndOf="@+id/install_step_method_icon"
|
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
|
|
android:id="@+id/install_step_method_button"
|
|
|
|
style="?styleButtonText"
|
|
|
|
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.step(2)}"
|
2019-10-25 19:17:13 +02:00
|
|
|
android:text="@string/install_next"
|
2019-10-25 19:13:54 +02:00
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
|
|
<RadioGroup
|
2019-10-22 20:46:09 +02:00
|
|
|
gone="@{viewModel.step != 1}"
|
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"
|
2019-11-01 19:15:05 +01:00
|
|
|
android:paddingStart="3dp"
|
|
|
|
android:paddingEnd="3dp"
|
2019-10-25 19:13:54 +02:00
|
|
|
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}">
|
|
|
|
|
|
|
|
<com.google.android.material.radiobutton.MaterialRadioButton
|
|
|
|
android:id="@+id/method_download"
|
|
|
|
style="?styleRadioNormal"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/download_zip_only"
|
|
|
|
tools:checked="true" />
|
|
|
|
|
|
|
|
<com.google.android.material.radiobutton.MaterialRadioButton
|
|
|
|
android:id="@+id/method_patch"
|
|
|
|
style="?styleRadioNormal"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:button="@drawable/ic_radio_check_button"
|
|
|
|
android:text="@string/select_patch_file" />
|
|
|
|
|
|
|
|
<com.google.android.material.radiobutton.MaterialRadioButton
|
|
|
|
android:id="@+id/method_direct"
|
|
|
|
style="?styleRadioNormal"
|
|
|
|
gone="@{!viewModel.rooted}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:button="@drawable/ic_radio_check_button"
|
|
|
|
android:text="@string/direct_install" />
|
|
|
|
|
|
|
|
<com.google.android.material.radiobutton.MaterialRadioButton
|
|
|
|
android:id="@+id/method_inactive_slot"
|
|
|
|
style="?styleRadioNormal"
|
|
|
|
gone="@{!viewModel.rooted || !viewModel.aB}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:button="@drawable/ic_radio_check_button"
|
|
|
|
android:text="@string/install_inactive_slot" />
|
|
|
|
|
|
|
|
</RadioGroup>
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
|
|
style="?styleButtonText"
|
|
|
|
gone="@{viewModel.step != 2}"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="end"
|
|
|
|
android:layout_margin="@dimen/l1"
|
|
|
|
android:onClick="@{() -> viewModel.install()}"
|
2019-10-25 19:17:13 +02:00
|
|
|
android:text="@string/install_start"
|
2019-10-25 19:13:54 +02:00
|
|
|
app:icon="@drawable/ic_forth_md2"
|
|
|
|
app:iconGravity="textEnd" />
|
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
|
|
|
|
goneUnless="@{viewModel.loading}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:gravity="center"
|
|
|
|
android:orientation="vertical">
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:gravity="center"
|
|
|
|
android:text="@string/safetynet_attest_loading"
|
|
|
|
android:textAppearance="?appearanceTextTitleNormal" />
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
<FrameLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="@dimen/l1">
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
<ProgressBar
|
|
|
|
style="?styleProgressDeterminate"
|
|
|
|
invisible="@{viewModel.progress <= 0}"
|
|
|
|
android:layout_width="100dp"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:progress="@{viewModel.progress}" />
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
<ProgressBar
|
|
|
|
style="?styleProgressIndeterminate"
|
|
|
|
invisibleUnless="@{viewModel.progress <= 0}"
|
|
|
|
android:layout_width="100dp"
|
|
|
|
android:layout_gravity="center" />
|
2019-10-22 20:46:09 +02:00
|
|
|
|
2019-10-25 19:13:54 +02:00
|
|
|
</FrameLayout>
|
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
|
|
|
</FrameLayout>
|
2019-10-22 16:29:01 +02:00
|
|
|
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
|
|
|
|
</layout>
|