mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-02 14:35:29 +00:00
118 lines
4.9 KiB
XML
118 lines
4.9 KiB
XML
|
<?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>
|
||
|
|
||
|
<variable
|
||
|
name="item"
|
||
|
type="com.topjohnwu.magisk.model.entity.recycler.HideItem" />
|
||
|
|
||
|
<variable
|
||
|
name="viewModel"
|
||
|
type="com.topjohnwu.magisk.redesign.hide.HideViewModel" />
|
||
|
|
||
|
</data>
|
||
|
|
||
|
<com.google.android.material.card.MaterialCardView
|
||
|
style="?styleCardNormal"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
tools:layout_gravity="center"
|
||
|
tools:layout_marginBottom="@dimen/l1">
|
||
|
|
||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||
|
invisible="@{item.isExpanded}"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:background="?selectableItemBackground"
|
||
|
android:onClick="@{(v) -> item.expand(v)}">
|
||
|
|
||
|
<androidx.appcompat.widget.AppCompatImageView
|
||
|
android:id="@+id/hide_icon"
|
||
|
style="?styleImageNormal"
|
||
|
android:layout_margin="@dimen/l1"
|
||
|
android:src="@{item.item.info.icon}"
|
||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||
|
app:layout_constraintStart_toStartOf="parent"
|
||
|
app:layout_constraintTop_toTopOf="parent"
|
||
|
tools:src="@drawable/ic_magisk" />
|
||
|
|
||
|
<androidx.appcompat.widget.AppCompatTextView
|
||
|
android:id="@+id/hide_name"
|
||
|
android:layout_width="0dp"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:layout_marginStart="@dimen/l1"
|
||
|
android:ellipsize="middle"
|
||
|
android:singleLine="true"
|
||
|
android:text="@{item.item.info.name}"
|
||
|
android:textAppearance="?appearanceTextBodyNormal"
|
||
|
android:textStyle="bold"
|
||
|
app:layout_constraintBottom_toTopOf="@+id/hide_package"
|
||
|
app:layout_constraintEnd_toStartOf="@+id/hide_expand_icon"
|
||
|
app:layout_constraintStart_toEndOf="@+id/hide_icon"
|
||
|
app:layout_constraintTop_toTopOf="parent"
|
||
|
app:layout_constraintVertical_chainStyle="packed"
|
||
|
tools:text="@string/app_name" />
|
||
|
|
||
|
<androidx.appcompat.widget.AppCompatTextView
|
||
|
android:id="@+id/hide_package"
|
||
|
android:layout_width="0dp"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:textAppearance="?appearanceTextCaptionVariant"
|
||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||
|
app:layout_constraintEnd_toEndOf="@+id/hide_name"
|
||
|
app:layout_constraintStart_toStartOf="@+id/hide_name"
|
||
|
app:layout_constraintTop_toBottomOf="@+id/hide_name"
|
||
|
tools:text="com.topjohnwu.magisk" />
|
||
|
|
||
|
<androidx.appcompat.widget.AppCompatImageView
|
||
|
android:id="@+id/hide_expand_icon"
|
||
|
style="?styleIconNormal"
|
||
|
invisible="@{item.item.processes.empty}"
|
||
|
android:background="@null"
|
||
|
android:rotation="180"
|
||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||
|
app:layout_constraintEnd_toEndOf="parent"
|
||
|
app:layout_constraintTop_toTopOf="parent"
|
||
|
app:srcCompat="@drawable/ic_back_md2" />
|
||
|
|
||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||
|
|
||
|
<LinearLayout
|
||
|
goneUnless="@{item.isExpanded}"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:orientation="vertical">
|
||
|
|
||
|
<com.google.android.material.appbar.MaterialToolbar
|
||
|
style="?styleToolbar"
|
||
|
onNavigationClick="@{(v) -> item.collapse(v)}"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="48dp"
|
||
|
app:navigationIcon="@drawable/ic_back_md2"
|
||
|
app:title="Processes"
|
||
|
app:titleTextAppearance="?appearanceTextBodyNormal" />
|
||
|
|
||
|
<androidx.recyclerview.widget.RecyclerView
|
||
|
itemBinding="@{viewModel.itemInternalBinding}"
|
||
|
items="@{item.items}"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_height="wrap_content"
|
||
|
android:orientation="vertical"
|
||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||
|
tools:listitem="@layout/item_hide_process_md2" />
|
||
|
|
||
|
</LinearLayout>
|
||
|
|
||
|
<ProgressBar
|
||
|
style="?styleProgressDeterminate"
|
||
|
android:layout_width="match_parent"
|
||
|
android:layout_gravity="top"
|
||
|
android:max="@{item.items.size()}"
|
||
|
android:progress="@{item.itemsChecked}" />
|
||
|
|
||
|
</com.google.android.material.card.MaterialCardView>
|
||
|
|
||
|
</layout>
|