2019-10-03 17:31:45 +02:00
|
|
|
<?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>
|
|
|
|
|
2020-08-09 02:32:13 -07:00
|
|
|
<import type="com.topjohnwu.magisk.core.Info" />
|
|
|
|
|
|
|
|
<import type="com.topjohnwu.magisk.ui.home.MagiskState" />
|
|
|
|
|
2019-10-03 17:31:45 +02:00
|
|
|
<variable
|
|
|
|
name="viewModel"
|
2020-01-13 00:43:09 +08:00
|
|
|
type="com.topjohnwu.magisk.ui.home.HomeViewModel" />
|
2019-10-03 17:31:45 +02:00
|
|
|
|
|
|
|
</data>
|
|
|
|
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:clipToPadding="false"
|
2019-11-25 17:25:49 +01:00
|
|
|
android:fillViewport="true"
|
2019-10-22 18:08:57 +02:00
|
|
|
android:paddingTop="@{viewModel.insets.top + (int) @dimen/internal_action_bar_size}"
|
2020-02-01 13:56:56 +01:00
|
|
|
android:paddingBottom="@{viewModel.insets.bottom + (int) @dimen/l3}"
|
2019-10-03 17:31:45 +02:00
|
|
|
tools:layout_marginTop="24dp">
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
2019-11-25 17:25:49 +01:00
|
|
|
android:layout_height="match_parent"
|
2019-10-08 18:51:31 +02:00
|
|
|
android:clipToPadding="false"
|
2019-10-26 20:59:30 +02:00
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingTop="@dimen/l1">
|
2019-10-03 17:31:45 +02:00
|
|
|
|
2020-02-15 21:57:03 -08:00
|
|
|
<com.google.android.material.button.MaterialButton
|
|
|
|
android:layout_gravity="center"
|
|
|
|
style="@style/WidgetFoundation.Button"
|
2020-02-28 11:53:25 -08:00
|
|
|
gone="@{!viewModel.showTest}"
|
2020-02-15 21:57:03 -08:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:onClick="@{() -> viewModel.onTestPressed()}"
|
|
|
|
android:text="TEST"
|
|
|
|
android:textAllCaps="false"
|
|
|
|
tools:visibility="gone"/>
|
|
|
|
|
2019-11-01 19:02:30 +01:00
|
|
|
<com.google.android.material.card.MaterialCardView
|
2019-11-25 17:54:04 +01:00
|
|
|
style="@style/WidgetFoundation.Card.Primary"
|
2019-11-01 19:02:30 +01:00
|
|
|
goneUnless="@{viewModel.noticeVisible}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:layout_marginBottom="@dimen/l1">
|
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content">
|
|
|
|
|
2020-02-11 19:46:29 -08:00
|
|
|
<TextView
|
2019-11-01 19:02:30 +01:00
|
|
|
android:id="@+id/home_notice_content"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:padding="@dimen/l1"
|
|
|
|
android:text="@string/home_notice_content"
|
2019-11-22 19:29:53 +01:00
|
|
|
android:textAppearance="@style/AppearanceFoundation.Caption.OnPrimary"
|
2019-11-01 19:02:30 +01:00
|
|
|
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"
|
2019-11-22 19:29:53 +01:00
|
|
|
style="@style/WidgetFoundation.Button.Text.OnPrimary"
|
2019-11-01 19:02:30 +01:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:onClick="@{() -> viewModel.hideNotice()}"
|
2020-02-10 01:43:28 -08:00
|
|
|
android:text="@string/hide"
|
2019-11-01 19:02:30 +01:00
|
|
|
android:textAllCaps="false"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
2020-01-31 19:37:45 +01:00
|
|
|
<include
|
|
|
|
android:id="@+id/home_magisk_wrapper"
|
|
|
|
layout="@layout/include_home_magisk"
|
|
|
|
viewModel="@{viewModel}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2020-02-11 19:46:29 -08:00
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
2020-01-31 19:37:45 +01:00
|
|
|
app:layout_constraintTop_toBottomOf="@+id/home_device_wrapper" />
|
2019-10-26 15:14:20 +02:00
|
|
|
|
2020-01-31 19:37:45 +01:00
|
|
|
<include
|
|
|
|
android:id="@+id/home_manager_wrapper"
|
|
|
|
layout="@layout/include_home_manager"
|
|
|
|
viewModel="@{viewModel}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2020-02-11 19:46:29 -08:00
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:layout_marginTop="@dimen/l1"
|
2020-01-31 19:37:45 +01:00
|
|
|
app:layout_constraintTop_toBottomOf="@+id/home_magisk_wrapper" />
|
2019-10-03 17:31:45 +02:00
|
|
|
|
2020-08-09 02:32:13 -07:00
|
|
|
<com.google.android.material.button.MaterialButton
|
|
|
|
style="@style/WidgetFoundation.Button.Outlined"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:layout_marginTop="@dimen/l1"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/home_check_safetynet"
|
|
|
|
android:textAllCaps="false"
|
|
|
|
android:textSize="12sp"
|
|
|
|
android:onClick="@{() -> viewModel.onSafetyNetPressed()}"
|
|
|
|
app:cornerRadius="@dimen/r1"
|
|
|
|
app:icon="@drawable/ic_safetynet_md2" />
|
|
|
|
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
|
|
style="@style/WidgetFoundation.Button.Outlined.Error"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:layout_marginTop="@dimen/l_125"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/uninstall_magisk_title"
|
|
|
|
android:textAllCaps="false"
|
|
|
|
android:textSize="12sp"
|
|
|
|
android:onClick="@{() -> viewModel.onDeletePressed()}"
|
|
|
|
gone="@{Info.env.magiskVersionCode < 0 || viewModel.stateMagisk == MagiskState.LOADING || !viewModel.isConnected}"
|
|
|
|
app:cornerRadius="@dimen/r1"
|
|
|
|
app:icon="@drawable/ic_delete_md2" />
|
|
|
|
|
2019-11-25 17:25:49 +01:00
|
|
|
<com.google.android.material.card.MaterialCardView
|
2019-12-02 18:39:22 +01:00
|
|
|
style="@style/WidgetFoundation.Card"
|
2019-10-03 17:31:45 +02:00
|
|
|
android:layout_width="match_parent"
|
2019-10-07 20:09:12 +02:00
|
|
|
android:layout_height="wrap_content"
|
2019-11-25 17:25:49 +01:00
|
|
|
android:layout_gravity="bottom"
|
|
|
|
android:layout_margin="@dimen/l1">
|
2019-10-26 21:14:01 +02:00
|
|
|
|
2019-11-25 17:25:49 +01:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingTop="@dimen/l1">
|
|
|
|
|
2020-02-11 19:46:29 -08:00
|
|
|
<TextView
|
2019-11-25 17:25:49 +01:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:text="@string/home_support_title"
|
2019-12-02 18:39:22 +01:00
|
|
|
android:textAppearance="@style/AppearanceFoundation.Title" />
|
2019-11-25 17:25:49 +01:00
|
|
|
|
2020-02-11 19:46:29 -08:00
|
|
|
<TextView
|
2019-11-25 17:25:49 +01:00
|
|
|
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:text="@string/home_support_content"
|
2019-12-02 18:39:22 +01:00
|
|
|
android:textAppearance="@style/AppearanceFoundation.Caption.Variant" />
|
2019-11-25 17:25:49 +01:00
|
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
2020-01-23 02:23:42 +08:00
|
|
|
dividerHorizontal="@{@drawable/divider_l1}"
|
|
|
|
dividerVertical="@{@drawable/divider_l1}"
|
2019-11-25 17:25:49 +01:00
|
|
|
itemBinding="@{viewModel.itemDeveloperBinding}"
|
|
|
|
items="@{viewModel.items}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="@dimen/l1"
|
|
|
|
android:clipToPadding="false"
|
2020-02-11 19:46:29 -08:00
|
|
|
android:nestedScrollingEnabled="false"
|
2019-11-25 17:25:49 +01:00
|
|
|
android:orientation="horizontal"
|
|
|
|
android:overScrollMode="ifContentScrolls"
|
|
|
|
android:paddingStart="@dimen/l1"
|
|
|
|
app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager"
|
|
|
|
app:spanCount="2"
|
|
|
|
tools:itemCount="3"
|
|
|
|
tools:listitem="@layout/item_developer" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
2019-10-03 17:31:45 +02:00
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
|
2020-01-12 16:07:30 +08:00
|
|
|
</layout>
|