2019-10-17 16:57:00 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2019-10-17 17:26:35 +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>
|
|
|
|
|
|
|
|
<variable
|
|
|
|
name="viewModel"
|
|
|
|
type="com.topjohnwu.magisk.redesign.settings.SettingsViewModel" />
|
|
|
|
|
|
|
|
</data>
|
|
|
|
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
2019-10-17 17:26:35 +00:00
|
|
|
android:clipToPadding="false"
|
|
|
|
android:fillViewport="true"
|
2019-10-22 16:08:57 +00:00
|
|
|
android:paddingTop="@{viewModel.insets.top + (int) @dimen/internal_action_bar_size}"
|
2019-10-17 17:26:35 +00:00
|
|
|
android:paddingBottom="@{viewModel.insets.bottom + (int) @dimen/l2}"
|
2019-10-20 15:28:18 +00:00
|
|
|
tools:layout_marginTop="24dp"
|
|
|
|
tools:paddingTop="@dimen/l1">
|
2019-10-17 16:57:00 +00:00
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
android:layout_width="match_parent"
|
2019-11-22 18:29:53 +00:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:paddingTop="@dimen/l1">
|
2019-10-17 17:26:35 +00:00
|
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
2019-11-22 18:29:53 +00:00
|
|
|
android:id="@+id/settings_card_redesign"
|
|
|
|
style="@style/WidgetFoundation.Card"
|
2019-10-17 17:26:35 +00:00
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
2019-11-22 18:29:53 +00:00
|
|
|
android:layout_marginLeft="@dimen/l1"
|
|
|
|
android:layout_marginRight="@dimen/l1"
|
|
|
|
android:layout_marginBottom="@dimen/l1"
|
|
|
|
android:onClick="@{() -> viewModel.toggle(viewModel.redesign)}"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintStart_toEndOf="@+id/settings_card_theme"
|
2019-10-17 17:26:35 +00:00
|
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
|
2019-10-20 15:28:18 +00:00
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
2019-10-17 17:26:35 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2019-10-20 15:28:18 +00:00
|
|
|
android:orientation="vertical">
|
2019-10-17 17:26:35 +00:00
|
|
|
|
2019-10-20 15:28:18 +00:00
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:layout_width="0dp"
|
2019-10-17 17:26:35 +00:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center"
|
2019-11-22 18:29:53 +00:00
|
|
|
android:gravity="start"
|
|
|
|
android:paddingStart="@dimen/l1"
|
|
|
|
android:text="Redesign"
|
|
|
|
android:textAppearance="@style/AppearanceFoundation.Body"
|
2019-10-20 15:28:18 +00:00
|
|
|
android:textStyle="bold"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
2019-11-22 18:29:53 +00:00
|
|
|
app:layout_constraintEnd_toStartOf="@+id/settings_card_redesign_switch"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
|
|
android:id="@+id/settings_card_redesign_switch"
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center"
|
|
|
|
android:layout_marginEnd="@dimen/l_50"
|
|
|
|
android:checked="@={viewModel.redesign}"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
2019-10-20 15:28:18 +00:00
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
2019-10-17 17:26:35 +00:00
|
|
|
|
2019-10-20 15:28:18 +00:00
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
2019-10-17 17:26:35 +00:00
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
2019-11-22 18:29:53 +00:00
|
|
|
android:id="@+id/settings_card_theme"
|
|
|
|
style="@style/WidgetFoundation.Card"
|
2019-10-17 17:26:35 +00:00
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
2019-11-22 18:29:53 +00:00
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:onClick="@{() -> viewModel.themePressed()}"
|
|
|
|
app:layout_constraintEnd_toStartOf="@+id/settings_card_redesign"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2019-10-17 17:26:35 +00:00
|
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
|
2019-10-21 17:30:14 +00:00
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
2019-10-17 17:26:35 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2019-10-21 17:30:14 +00:00
|
|
|
android:orientation="vertical">
|
2019-10-17 17:26:35 +00:00
|
|
|
|
2019-11-22 18:29:53 +00:00
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
|
|
android:id="@+id/settings_card_theme_dark_icon"
|
|
|
|
style="@style/WidgetFoundation.Icon"
|
|
|
|
android:background="@null"
|
2019-10-21 17:30:14 +00:00
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
2019-11-22 18:29:53 +00:00
|
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
|
|
app:srcCompat="@drawable/ic_paint" />
|
2019-10-17 17:26:35 +00:00
|
|
|
|
2019-11-22 18:29:53 +00:00
|
|
|
<androidx.appcompat.widget.AppCompatImageView
|
|
|
|
android:id="@+id/settings_card_theme_dark_pointer"
|
|
|
|
style="@style/WidgetFoundation.Icon"
|
|
|
|
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.appcompat.widget.AppCompatTextView
|
|
|
|
android:layout_width="0dp"
|
2019-10-17 17:26:35 +00:00
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="center"
|
2019-11-22 18:29:53 +00:00
|
|
|
android:background="@null"
|
|
|
|
android:gravity="start|center_vertical"
|
|
|
|
android:singleLine="true"
|
|
|
|
android:text="@string/section_theme"
|
|
|
|
android:textAppearance="@style/AppearanceFoundation.Body"
|
|
|
|
android:textStyle="bold"
|
2019-10-21 17:30:14 +00:00
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
2019-11-22 18:29:53 +00:00
|
|
|
app:layout_constraintEnd_toStartOf="@+id/settings_card_theme_dark_pointer"
|
|
|
|
app:layout_constraintStart_toEndOf="@+id/settings_card_theme_dark_icon"
|
2019-10-21 17:30:14 +00:00
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
2019-10-17 17:26:35 +00:00
|
|
|
|
2019-10-21 17:30:14 +00:00
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
2019-10-17 17:26:35 +00:00
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
2019-10-17 16:57:00 +00:00
|
|
|
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
|
|
|
|
</layout>
|