2019-10-17 16:57:00 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2019-10-30 16:54:43 +00: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-17 16:57:00 +00:00
|
|
|
|
|
|
|
<data>
|
|
|
|
|
2019-11-05 18:38:02 +00:00
|
|
|
<import type="com.topjohnwu.magisk.R" />
|
|
|
|
|
2019-10-30 16:54:43 +00:00
|
|
|
<import type="com.topjohnwu.magisk.Config" />
|
|
|
|
|
2019-10-17 16:57:00 +00:00
|
|
|
<variable
|
|
|
|
name="viewModel"
|
|
|
|
type="com.topjohnwu.magisk.redesign.module.ModuleViewModel" />
|
|
|
|
|
|
|
|
</data>
|
|
|
|
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2019-11-05 18:38:02 +00:00
|
|
|
android:clipToPadding="false"
|
2019-10-30 16:54:43 +00:00
|
|
|
android:fillViewport="true"
|
|
|
|
android:paddingTop="@{viewModel.insets.top + (int) @dimen/internal_action_bar_size}"
|
2019-11-05 18:38:02 +00:00
|
|
|
android:paddingBottom="@{viewModel.insets.bottom + (int) @dimen/l1}"
|
|
|
|
tools:paddingBottom="64dp"
|
2019-10-30 16:54:43 +00:00
|
|
|
tools:paddingTop="24dp">
|
2019-10-17 16:57:00 +00:00
|
|
|
|
2019-11-05 18:38:02 +00:00
|
|
|
<LinearLayout
|
2019-10-17 16:57:00 +00:00
|
|
|
android:layout_width="match_parent"
|
2019-11-05 18:38:02 +00:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:orientation="vertical">
|
2019-10-30 16:54:43 +00:00
|
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
android:id="@+id/module_notice"
|
|
|
|
style="?styleCardNormal"
|
|
|
|
gone="@{!Config.coreOnly}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_margin="@dimen/l1"
|
|
|
|
android:visibility="gone"
|
|
|
|
app:cardBackgroundColor="?colorError"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
tools:visibility="visible">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:gravity="center"
|
|
|
|
android:padding="@dimen/l1"
|
|
|
|
android:text="@string/module_safe_mode_message"
|
|
|
|
android:textAppearance="?appearanceTextCaptionOnPrimary"
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
2019-11-05 18:38:02 +00:00
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
gone="@{viewModel.itemsPending.empty}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:paddingStart="@dimen/l1"
|
|
|
|
android:paddingEnd="@dimen/l1">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="@dimen/l1"
|
|
|
|
android:layout_marginBottom="@dimen/l1"
|
|
|
|
android:text="Applied on next boot"
|
|
|
|
android:textAppearance="?appearanceTextBodyNormal"
|
|
|
|
android:textColor="?colorPrimaryTransient"
|
|
|
|
android:textStyle="bold"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toStartOf="@+id/module_reboot_button"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
|
|
android:id="@+id/module_reboot_button"
|
|
|
|
style="?styleButtonText"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/reboot"
|
|
|
|
android:textAllCaps="false"
|
|
|
|
app:icon="@drawable/ic_restart"
|
|
|
|
app:iconPadding="@dimen/l_50"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
2019-10-30 16:54:43 +00:00
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
2019-11-05 18:38:02 +00:00
|
|
|
dividerHorizontal="@{R.drawable.divider_l1}"
|
|
|
|
dividerVertical="@{R.drawable.divider_l1}"
|
|
|
|
gone="@{viewModel.itemsPending.empty}"
|
|
|
|
itemBinding="@{viewModel.itemBinding}"
|
|
|
|
items="@{viewModel.itemsPending}"
|
|
|
|
nestedScrollingEnabled="@{false}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:clipToPadding="false"
|
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingStart="@dimen/l1"
|
|
|
|
android:paddingEnd="0dp"
|
|
|
|
app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager"
|
|
|
|
app:spanCount="2"
|
|
|
|
tools:itemCount="1"
|
|
|
|
tools:listitem="@layout/item_module_md2" />
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
gone="@{viewModel.itemsPending.empty || viewModel.items.empty}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:paddingStart="@dimen/l1"
|
|
|
|
android:paddingEnd="@dimen/l1"
|
|
|
|
android:text="Active"
|
|
|
|
android:textAppearance="?appearanceTextBodyNormal"
|
|
|
|
android:textColor="?colorPrimaryTransient"
|
|
|
|
android:textStyle="bold"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toStartOf="@+id/module_reboot_button"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
|
dividerHorizontal="@{R.drawable.divider_l1}"
|
|
|
|
dividerVertical="@{R.drawable.divider_l1}"
|
|
|
|
gone="@{viewModel.items.empty}"
|
2019-10-30 16:54:43 +00:00
|
|
|
itemBinding="@{viewModel.itemBinding}"
|
|
|
|
items="@{viewModel.items}"
|
2019-11-05 18:38:02 +00:00
|
|
|
nestedScrollingEnabled="@{false}"
|
2019-10-30 16:54:43 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="@dimen/l1"
|
2019-11-05 18:38:02 +00:00
|
|
|
android:clipToPadding="false"
|
2019-10-30 16:54:43 +00:00
|
|
|
android:orientation="vertical"
|
2019-11-05 18:38:02 +00:00
|
|
|
android:paddingStart="@dimen/l1"
|
|
|
|
android:paddingEnd="0dp"
|
|
|
|
app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/module_notice"
|
|
|
|
app:spanCount="2"
|
|
|
|
tools:itemCount="3"
|
|
|
|
tools:listitem="@layout/item_module_md2" />
|
|
|
|
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
|
|
style="?styleButtonText"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:layout_marginTop="@dimen/l1"
|
|
|
|
android:text="Download more"
|
|
|
|
android:textAllCaps="false"
|
|
|
|
app:icon="@drawable/ic_download_md2" />
|
2019-10-30 16:54:43 +00:00
|
|
|
|
2019-11-05 18:38:02 +00:00
|
|
|
</LinearLayout>
|
2019-10-17 16:57:00 +00:00
|
|
|
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
|
|
|
|
</layout>
|