Magisk/app/src/main/res/layout/fragment_superuser_md2.xml

188 lines
9.1 KiB
XML
Raw Normal View History

2019-10-17 18:57:00 +02:00
<?xml version="1.0" encoding="utf-8"?>
2019-10-18 17:04:41 +02: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 18:57:00 +02:00
<data>
<import type="com.topjohnwu.magisk.R" />
2019-10-17 18:57:00 +02:00
<variable
name="viewModel"
type="com.topjohnwu.magisk.redesign.superuser.SuperuserViewModel" />
</data>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
2019-10-18 17:04:41 +02:00
android:clipToPadding="false"
android:fillViewport="true"
android:paddingTop="@{viewModel.insets.top + (int) @dimen/internal_action_bar_size}"
2019-10-18 17:04:41 +02:00
android:paddingBottom="@{viewModel.insets.bottom + (int) @dimen/l2}"
2019-10-19 18:29:48 +02:00
tools:layout_marginTop="24dp"
tools:paddingTop="@dimen/l1">
2019-10-17 18:57:00 +02:00
<androidx.constraintlayout.widget.ConstraintLayout
2019-10-17 18:57:00 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2019-10-31 20:53:37 +01:00
android:orientation="vertical"
android:paddingTop="@dimen/l1">
2019-10-18 17:04:41 +02:00
<com.google.android.material.card.MaterialCardView
android:id="@+id/superuser_hide"
style="@style/WidgetFoundation.Card"
android:layout_width="0dp"
2019-10-18 17:04:41 +02:00
android:layout_height="wrap_content"
2019-10-19 18:29:48 +02:00
android:layout_marginStart="@dimen/l1"
android:layout_marginEnd="@dimen/l1"
2019-10-18 17:04:41 +02:00
android:onClick="@{() -> viewModel.hidePressed()}"
2019-10-31 20:53:37 +01:00
app:layout_constraintEnd_toStartOf="@+id/superuser_safetynet"
app:layout_constraintStart_toStartOf="parent"
2019-10-18 17:04:41 +02:00
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/superuser_hide_icon"
style="@style/WidgetFoundation.Icon"
2019-10-18 17:04:41 +02:00
android:background="@null"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_hide_md2" />
2019-10-18 17:04:41 +02:00
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:requiresFadingEdge="horizontal"
android:singleLine="true"
2019-10-31 20:53:37 +01:00
android:text="@string/magisk_hide_md2"
android:textAppearance="@style/AppearanceFoundation.Body"
2019-10-18 17:04:41 +02:00
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/superuser_hide_icon_pointer"
app:layout_constraintStart_toEndOf="@+id/superuser_hide_icon"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/superuser_hide_icon_pointer"
style="@style/WidgetFoundation.Icon"
2019-10-18 17:04:41 +02:00
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>
2019-10-19 22:28:01 +02:00
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
android:id="@+id/superuser_safetynet"
style="@style/WidgetFoundation.Card"
android:layout_width="0dp"
2019-10-19 22:28:01 +02:00
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/l1"
android:onClick="@{() -> viewModel.safetynetPressed()}"
2019-10-31 20:53:37 +01:00
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/superuser_hide"
2019-10-19 22:28:01 +02:00
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/superuser_safetynet_icon"
style="@style/WidgetFoundation.Icon"
2019-10-19 22:28:01 +02:00
android:background="@null"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_safetynet_md2" />
2019-10-19 22:28:01 +02:00
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:requiresFadingEdge="horizontal"
android:singleLine="true"
2019-10-31 20:53:37 +01:00
android:text="@string/safetyNet"
android:textAppearance="@style/AppearanceFoundation.Body"
2019-10-19 22:28:01 +02:00
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/superuser_safetynet_icon_pointer"
app:layout_constraintStart_toEndOf="@+id/superuser_safetynet_icon"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/superuser_safetynet_icon_pointer"
style="@style/WidgetFoundation.Icon"
2019-10-19 22:28:01 +02:00
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>
2019-10-18 17:04:41 +02:00
</com.google.android.material.card.MaterialCardView>
<androidx.constraintlayout.widget.Barrier
android:id="@+id/superuser_top_barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="bottom"
app:constraint_referenced_ids="superuser_hide,superuser_safetynet" />
<androidx.recyclerview.widget.RecyclerView
dividerHorizontal="@{R.drawable.divider_l1}"
dividerVertical="@{R.drawable.divider_l1}"
2019-10-31 20:53:37 +01:00
goneUnless="@{viewModel.loaded || !viewModel.items.empty}"
itemBinding="@{viewModel.itemBinding}"
items="@{viewModel.items}"
nestedScrollingEnabled="@{false}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:orientation="vertical"
android:paddingStart="@dimen/l1"
android:paddingTop="@dimen/l1"
android:paddingBottom="@dimen/l1"
app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager"
2019-10-31 20:53:37 +01:00
app:layout_constraintTop_toBottomOf="@+id/superuser_top_barrier"
app:spanCount="2"
tools:listitem="@layout/item_policy_md2" />
2019-10-31 20:53:37 +01:00
<LinearLayout
goneUnless="@{viewModel.loading &amp;&amp; viewModel.items.empty}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/superuser_top_barrier">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/safetynet_attest_loading"
android:textAppearance="@style/AppearanceFoundation.Title"
2019-10-31 20:53:37 +01:00
android:textStyle="bold" />
<ProgressBar
style="@style/WidgetFoundation.ProgressBar.Indeterminate"
2019-10-31 20:53:37 +01:00
android:layout_marginTop="@dimen/l1" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
2019-10-17 18:57:00 +02:00
</androidx.core.widget.NestedScrollView>
</layout>