2017-01-24 06:19:28 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2019-04-26 19:23:25 +00:00
|
|
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
2018-12-27 09:28:06 +00:00
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
2019-04-26 19:23:25 +00:00
|
|
|
xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
|
|
|
|
<data>
|
|
|
|
|
|
|
|
<variable
|
|
|
|
name="viewModel"
|
|
|
|
type="com.topjohnwu.magisk.ui.surequest.SuRequestViewModel" />
|
|
|
|
|
|
|
|
</data>
|
2017-01-24 06:19:28 +00:00
|
|
|
|
|
|
|
<LinearLayout
|
2019-04-26 19:23:25 +00:00
|
|
|
android:id="@+id/su_popup"
|
2017-01-24 17:01:12 +00:00
|
|
|
android:layout_width="wrap_content"
|
2017-01-24 06:19:28 +00:00
|
|
|
android:layout_height="wrap_content"
|
2019-04-26 19:23:25 +00:00
|
|
|
android:layout_gravity="center"
|
|
|
|
android:background="?attr/colorBackgroundFloating"
|
|
|
|
android:minWidth="350dp"
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:id="@+id/request_title"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center_horizontal"
|
|
|
|
android:layout_marginTop="20dp"
|
|
|
|
android:layout_marginBottom="5dp"
|
|
|
|
android:gravity="center_horizontal"
|
|
|
|
android:text="@string/su_request_title"
|
|
|
|
android:textAppearance="?android:attr/textAppearanceLarge" />
|
2017-01-24 06:19:28 +00:00
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="wrap_content"
|
2017-01-24 17:01:12 +00:00
|
|
|
android:layout_height="wrap_content"
|
2019-04-26 19:23:25 +00:00
|
|
|
android:layout_gravity="center_horizontal"
|
|
|
|
android:layout_marginTop="10dp"
|
|
|
|
android:layout_marginBottom="10dp"
|
|
|
|
android:orientation="horizontal"
|
|
|
|
android:paddingStart="10dp"
|
|
|
|
android:paddingEnd="10dp">
|
2017-01-24 06:19:28 +00:00
|
|
|
|
2019-04-26 19:23:25 +00:00
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
|
|
android:id="@+id/app_icon"
|
|
|
|
android:layout_width="50dp"
|
|
|
|
android:layout_height="50dp"
|
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
android:layout_marginStart="5dp"
|
|
|
|
android:layout_marginEnd="10dp"
|
|
|
|
android:layout_weight="0"
|
|
|
|
android:src="@{viewModel.icon}"
|
|
|
|
tools:src="@drawable/ic_delete" />
|
|
|
|
|
|
|
|
<LinearLayout
|
2017-01-24 17:01:12 +00:00
|
|
|
android:layout_width="wrap_content"
|
2017-01-24 06:19:28 +00:00
|
|
|
android:layout_height="wrap_content"
|
2019-04-26 19:23:25 +00:00
|
|
|
android:layout_gravity="center_vertical"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
android:orientation="vertical">
|
2017-01-24 06:19:28 +00:00
|
|
|
|
2019-04-26 19:23:25 +00:00
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:id="@+id/app_name"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:ellipsize="end"
|
|
|
|
android:maxWidth="300dp"
|
|
|
|
android:maxLines="1"
|
|
|
|
android:minWidth="200dp"
|
|
|
|
android:text="@{viewModel.title}"
|
|
|
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
|
|
android:textColor="?android:textColorPrimary"
|
|
|
|
tools:text="Magisk" />
|
2017-01-24 06:19:28 +00:00
|
|
|
|
2019-04-26 19:23:25 +00:00
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:id="@+id/package_name"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:ellipsize="end"
|
|
|
|
android:maxWidth="300dp"
|
|
|
|
android:maxLines="1"
|
|
|
|
android:minWidth="200dp"
|
|
|
|
android:text="@{viewModel.packageName}"
|
|
|
|
android:textColor="?android:textColorSecondary"
|
|
|
|
tools:text="com.topjohnwu.magisk" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
2017-01-24 06:19:28 +00:00
|
|
|
|
2019-04-26 19:23:25 +00:00
|
|
|
<androidx.appcompat.widget.AppCompatSpinner
|
|
|
|
android:id="@+id/timeout"
|
|
|
|
itemBinding="@{viewModel.itemBinding}"
|
|
|
|
items="@{viewModel.items}"
|
|
|
|
onTouch="@{() -> viewModel.spinnerTouched()}"
|
|
|
|
android:layout_width="wrap_content"
|
2017-01-24 06:19:28 +00:00
|
|
|
android:layout_height="wrap_content"
|
2019-04-26 19:23:25 +00:00
|
|
|
android:layout_gravity="center_horizontal"
|
|
|
|
android:selectedItemPosition="@={viewModel.selectedItemPosition}" />
|
|
|
|
itemDropDownLayout="@{android.R.layout.simple_spinner_dropdown_item}"
|
|
|
|
android:onClick="@{() -> viewModel.spinnerPressed()}"
|
2017-01-24 06:19:28 +00:00
|
|
|
|
2019-04-26 19:23:25 +00:00
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:id="@+id/warning"
|
|
|
|
android:layout_width="wrap_content"
|
2017-01-24 06:19:28 +00:00
|
|
|
android:layout_height="wrap_content"
|
2019-04-26 19:23:25 +00:00
|
|
|
android:layout_gravity="center_horizontal"
|
|
|
|
android:layout_margin="5dp"
|
|
|
|
android:drawablePadding="10dp"
|
|
|
|
android:text="@{viewModel.warningText}"
|
|
|
|
android:textColor="?android:textColorSecondary"
|
|
|
|
tools:text="@string/su_warning" />
|
2018-01-11 17:53:49 +00:00
|
|
|
|
2019-04-26 19:23:25 +00:00
|
|
|
<LinearLayout
|
|
|
|
style="?android:buttonBarStyle"
|
|
|
|
android:layout_width="match_parent"
|
2018-01-11 17:53:49 +00:00
|
|
|
android:layout_height="match_parent"
|
2019-04-26 19:23:25 +00:00
|
|
|
android:gravity="bottom"
|
|
|
|
android:orientation="horizontal"
|
|
|
|
android:paddingStart="30dp"
|
|
|
|
android:paddingEnd="30dp">
|
|
|
|
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
|
|
android:id="@+id/deny_btn"
|
|
|
|
style="@style/Widget.Button.Text"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:onClick="@{() -> viewModel.denyPressed()}"
|
|
|
|
android:text="@{viewModel.denyText}"
|
|
|
|
tools:text="@string/deny" />
|
|
|
|
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
|
|
android:id="@+id/grant_btn"
|
|
|
|
style="@style/Widget.Button.Text"
|
|
|
|
gone="@{viewModel.canUseFingerprint}"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:onClick="@{() -> viewModel.grantPressed()}"
|
|
|
|
android:text="@string/grant" />
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
|
|
android:id="@+id/fingerprint"
|
|
|
|
gone="@{!viewModel.canUseFingerprint}"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:layout_weight="1"
|
|
|
|
android:padding="7dp"
|
|
|
|
android:tint="?attr/colorAccent"
|
|
|
|
app:srcCompat="@drawable/ic_fingerprint" />
|
|
|
|
</LinearLayout>
|
|
|
|
|
2017-01-24 06:19:28 +00:00
|
|
|
</LinearLayout>
|
|
|
|
|
2019-04-26 19:23:25 +00:00
|
|
|
</layout>
|