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>
|
|
|
|
|
2020-01-13 14:01:46 +00:00
|
|
|
<import type="com.topjohnwu.magisk.core.Config" />
|
2019-10-30 16:54:43 +00:00
|
|
|
|
2019-10-17 16:57:00 +00:00
|
|
|
<variable
|
|
|
|
name="viewModel"
|
2020-01-12 16:43:09 +00:00
|
|
|
type="com.topjohnwu.magisk.ui.module.ModuleViewModel" />
|
2019-10-17 16:57:00 +00:00
|
|
|
|
|
|
|
</data>
|
|
|
|
|
2019-11-14 17:56:03 +00:00
|
|
|
<FrameLayout
|
2019-10-17 16:57:00 +00:00
|
|
|
android:layout_width="match_parent"
|
2019-11-14 17:56:03 +00:00
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
2020-01-04 15:07:53 +00:00
|
|
|
android:id="@+id/module_list"
|
2019-11-14 17:56:03 +00:00
|
|
|
adapter="@{viewModel.adapter}"
|
2020-01-22 18:23:42 +00:00
|
|
|
dividerHorizontal="@{@drawable/divider_l1}"
|
|
|
|
dividerVertical="@{@drawable/divider_l1}"
|
2019-11-16 18:20:44 +00:00
|
|
|
gone="@{viewModel.loading && viewModel.items.empty}"
|
2019-11-14 17:56:03 +00:00
|
|
|
itemBinding="@{viewModel.itemBinding}"
|
|
|
|
items="@{viewModel.items}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:clipToPadding="false"
|
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingStart="@dimen/l1"
|
|
|
|
android:paddingTop="@{viewModel.insets.top + (int) @dimen/internal_action_bar_size + (int) @dimen/l1}"
|
|
|
|
android:paddingEnd="0dp"
|
2019-11-17 12:48:52 +00:00
|
|
|
android:paddingBottom="@{viewModel.insets.bottom + (int) @dimen/internal_action_bar_size + (int) @dimen/l1}"
|
2019-11-14 17:56:03 +00:00
|
|
|
app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager"
|
|
|
|
app:spanCount="2"
|
|
|
|
tools:listitem="@layout/item_module_md2" />
|
|
|
|
|
|
|
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
|
|
|
android:id="@+id/module_filter_toggle"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="bottom|end"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:layout_marginBottom="@{viewModel.insets.bottom + (int) @dimen/l1}"
|
2019-11-14 18:10:49 +00:00
|
|
|
app:backgroundTint="?colorSurfaceSurfaceVariant"
|
2019-11-14 17:56:03 +00:00
|
|
|
app:srcCompat="@drawable/ic_filter"
|
|
|
|
app:tint="?colorPrimary"
|
|
|
|
tools:layout_marginBottom="64dp" />
|
|
|
|
|
|
|
|
<com.google.android.material.circularreveal.cardview.CircularRevealCardView
|
|
|
|
android:id="@+id/module_filter"
|
2019-11-22 18:29:53 +00:00
|
|
|
style="@style/WidgetFoundation.Card.Variant"
|
2019-11-14 17:56:03 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:layout_gravity="bottom"
|
|
|
|
android:visibility="invisible"
|
|
|
|
app:cardCornerRadius="0dp">
|
|
|
|
|
|
|
|
<include
|
|
|
|
android:id="@+id/module_filter_include"
|
|
|
|
layout="@layout/include_module_filter"
|
|
|
|
viewModel="@{viewModel}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent" />
|
|
|
|
|
|
|
|
</com.google.android.material.circularreveal.cardview.CircularRevealCardView>
|
|
|
|
|
2019-11-15 21:16:59 +00:00
|
|
|
<LinearLayout
|
2019-11-16 18:20:44 +00:00
|
|
|
goneUnless="@{viewModel.loading && viewModel.items.empty}"
|
2019-11-15 21:16:59 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:gravity="center"
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:text="@string/safetynet_attest_loading"
|
2019-11-22 18:29:53 +00:00
|
|
|
android:textAppearance="@style/AppearanceFoundation.Title"
|
2019-11-15 21:16:59 +00:00
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
<ProgressBar
|
2019-11-22 18:29:53 +00:00
|
|
|
style="@style/WidgetFoundation.ProgressBar.Indeterminate"
|
2019-11-15 21:16:59 +00:00
|
|
|
android:layout_marginTop="@dimen/l1" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
2019-11-14 17:56:03 +00:00
|
|
|
</FrameLayout>
|
|
|
|
|
2019-10-17 16:57:00 +00:00
|
|
|
|
2020-01-12 16:43:09 +00:00
|
|
|
</layout>
|