2019-10-18 17:04:41 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2019-10-30 21:58:42 +01: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-18 17:04:41 +02:00
|
|
|
|
|
|
|
<data>
|
|
|
|
|
2019-10-30 21:58:42 +01:00
|
|
|
<import type="com.topjohnwu.magisk.R" />
|
|
|
|
|
2019-10-18 17:04:41 +02:00
|
|
|
<variable
|
|
|
|
name="viewModel"
|
|
|
|
type="com.topjohnwu.magisk.redesign.hide.HideViewModel" />
|
|
|
|
|
|
|
|
</data>
|
|
|
|
|
2019-10-31 20:53:37 +01:00
|
|
|
<FrameLayout
|
2019-10-18 17:04:41 +02:00
|
|
|
android:layout_width="match_parent"
|
2019-10-31 20:53:37 +01:00
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
2019-11-02 18:12:22 +01:00
|
|
|
<androidx.core.widget.NestedScrollView
|
|
|
|
android:id="@+id/hide_scroll_container"
|
|
|
|
onScrollStateChanged="@{() -> viewModel.hideFilter()}"
|
2019-10-31 20:53:37 +01:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:clipToPadding="false"
|
2019-11-02 18:12:22 +01:00
|
|
|
android:fillViewport="true"
|
2019-10-31 20:53:37 +01:00
|
|
|
android:paddingTop="@{viewModel.insets.top + (int) @dimen/internal_action_bar_size + (int) @dimen/l1}"
|
|
|
|
android:paddingBottom="@{viewModel.insets.bottom}"
|
2019-11-02 18:12:22 +01:00
|
|
|
tools:paddingTop="40dp">
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
style="?styleCardVariant"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
2019-11-04 17:39:51 +01:00
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
app:cardCornerRadius="24dp">
|
2019-11-02 18:12:22 +01:00
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
|
|
android:id="@+id/hide_filter_icon"
|
|
|
|
style="?styleIconNormal"
|
|
|
|
android:onClick="@{() -> viewModel.toggle(viewModel.isFilterExpanded)}"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
app:srcCompat="@drawable/ic_filter" />
|
|
|
|
|
|
|
|
<com.google.android.material.chip.ChipGroup
|
|
|
|
android:id="@+id/hide_filter_chip_group"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:paddingStart="@dimen/l_50"
|
|
|
|
android:paddingEnd="0dp"
|
|
|
|
app:chipSpacing="2dp"
|
|
|
|
app:layout_constraintBottom_toBottomOf="@+id/hide_filter_barrier"
|
|
|
|
app:layout_constraintEnd_toStartOf="@+id/hide_filter_icon"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
|
|
|
|
<com.google.android.material.chip.Chip
|
|
|
|
style="@style/Widget.MaterialComponents.Chip.Filter"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:checked="@={viewModel.showSystem}"
|
|
|
|
android:text="@string/show_system_app"
|
2019-11-04 17:39:17 +01:00
|
|
|
android:textAppearance="?appearanceTextCaptionNormal"
|
|
|
|
app:checkedIcon="@drawable/ic_check_md2"
|
|
|
|
app:chipBackgroundColor="?colorSurfaceVariant"
|
|
|
|
tools:checked="true" />
|
2019-11-02 18:12:22 +01:00
|
|
|
|
|
|
|
<com.google.android.material.chip.Chip
|
|
|
|
style="@style/Widget.MaterialComponents.Chip.Entry"
|
|
|
|
gone="@{viewModel.query.empty}"
|
|
|
|
onCloseClicked="@{() -> viewModel.resetQuery()}"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:checkable="false"
|
|
|
|
android:text="@{viewModel.query}"
|
2019-11-04 17:39:17 +01:00
|
|
|
android:textAppearance="?appearanceTextCaptionNormal"
|
|
|
|
app:chipBackgroundColor="?colorSurfaceVariant" />
|
2019-11-02 18:12:22 +01:00
|
|
|
|
|
|
|
</com.google.android.material.chip.ChipGroup>
|
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.Barrier
|
|
|
|
android:id="@+id/hide_filter_barrier"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
app:barrierDirection="bottom"
|
|
|
|
app:constraint_referenced_ids="hide_filter_icon,hide_filter_chip_group" />
|
|
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
|
|
android:id="@+id/hide_filter_search"
|
|
|
|
style="?styleCardNormal"
|
|
|
|
goneUnless="@{viewModel.isFilterExpanded}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2019-11-04 17:39:51 +01:00
|
|
|
android:layout_marginStart="@dimen/l_50"
|
|
|
|
android:layout_marginEnd="@dimen/l_50"
|
|
|
|
android:layout_marginBottom="@dimen/l_50"
|
2019-11-02 18:12:22 +01:00
|
|
|
android:visibility="gone"
|
2019-11-04 17:39:51 +01:00
|
|
|
app:cardCornerRadius="18dp"
|
2019-11-02 18:12:22 +01:00
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/hide_filter_barrier"
|
|
|
|
tools:visibility="visible">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
|
|
style="?styleIconNormal"
|
2019-11-04 17:39:51 +01:00
|
|
|
android:layout_width="48dp"
|
|
|
|
android:layout_height="36dp"
|
|
|
|
android:layout_gravity="center_vertical|start"
|
|
|
|
android:padding="6dp"
|
2019-11-02 18:12:22 +01:00
|
|
|
app:srcCompat="@drawable/ic_search_md2"
|
|
|
|
app:tint="?colorDisabled" />
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatEditText
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="48dp"
|
|
|
|
android:background="@null"
|
|
|
|
android:hint="@string/hide_filter_hint"
|
|
|
|
android:inputType="textUri"
|
2019-11-04 17:39:51 +01:00
|
|
|
android:minHeight="36dp"
|
2019-11-02 18:12:22 +01:00
|
|
|
android:paddingStart="0dp"
|
|
|
|
android:paddingEnd="@dimen/l1"
|
|
|
|
android:singleLine="true"
|
|
|
|
android:text="@={viewModel.query}"
|
2019-11-04 17:39:17 +01:00
|
|
|
android:textAppearance="?appearanceTextBodyNormal"
|
|
|
|
android:textColor="?colorTextTransient"
|
|
|
|
android:textColorHint="?colorOnSurfaceVariant" />
|
2019-11-02 18:12:22 +01:00
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
|
|
dividerVertical="@{R.drawable.divider_l1}"
|
|
|
|
invisibleUnless="@{viewModel.loaded || !viewModel.items.empty}"
|
|
|
|
itemBinding="@{viewModel.itemBinding}"
|
|
|
|
items="@{viewModel.items}"
|
|
|
|
nestedScrollingEnabled="@{false}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:layout_marginTop="@dimen/l1"
|
|
|
|
android:clipToPadding="false"
|
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingStart="@dimen/l1"
|
|
|
|
android:paddingEnd="@dimen/l1"
|
|
|
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
|
|
tools:listitem="@layout/item_hide_md2" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
2019-10-31 20:53:37 +01:00
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
goneUnless="@{viewModel.loading && viewModel.items.empty}"
|
|
|
|
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"
|
|
|
|
android:textAppearance="?appearanceTextTitleNormal"
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
<ProgressBar
|
|
|
|
style="?styleProgressIndeterminate"
|
|
|
|
android:layout_marginTop="@dimen/l1" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</FrameLayout>
|
2019-10-18 17:04:41 +02:00
|
|
|
|
|
|
|
</layout>
|