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

209 lines
8.9 KiB
XML
Raw Normal View History

2019-10-17 16:57:00 +00:00
<?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">
2019-10-17 16:57:00 +00:00
<data>
<import type="com.topjohnwu.magisk.redesign.theme.Theme" />
2019-10-17 16:57:00 +00:00
<variable
name="viewModel"
type="com.topjohnwu.magisk.redesign.theme.ThemeViewModel" />
</data>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:fillViewport="true"
android:paddingStart="@dimen/l1"
android:paddingTop="@{viewModel.insets.top + (int) @dimen/internal_action_bar_size + (int) @dimen/l1}"
android:paddingEnd="@dimen/l1"
android:paddingBottom="@{viewModel.insets.bottom + (int) @dimen/l1}">
2019-10-17 16:57:00 +00:00
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:columnCount="2"
android:orientation="vertical"
android:useDefaultMargins="true">
<com.google.android.material.card.MaterialCardView
android:id="@+id/theme_card_dark"
style="@style/WidgetFoundation.Card"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:onClick="@{() -> viewModel.darkModePressed()}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/settings_card_dark_icon"
style="@style/WidgetFoundation.Icon"
android:background="@null"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_day_night" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/settings_card_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"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@null"
android:gravity="start|center_vertical"
android:singleLine="true"
android:text="@string/settings_dark_mode_title"
android:textAppearance="@style/AppearanceFoundation.Body"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/settings_card_dark_pointer"
app:layout_constraintStart_toEndOf="@+id/settings_card_dark_icon"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<FrameLayout
android:id="@+id/theme_default"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/l1"
android:layout_marginEnd="@dimen/l1"
android:theme="@style/ThemeFoundationMD2.Piplup"
app:layout_constraintEnd_toStartOf="@+id/theme_amoled"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/theme_card_dark">
<include
layout="@layout/item_theme"
theme="@{Theme.Piplup}"
viewModel="@{viewModel}" />
</FrameLayout>
<FrameLayout
android:id="@+id/theme_amoled"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/l1"
android:theme="@style/ThemeFoundationMD2.Amoled"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/theme_default"
app:layout_constraintTop_toBottomOf="@+id/theme_card_dark">
<include
layout="@layout/item_theme"
theme="@{Theme.PiplupAmoled}"
viewModel="@{viewModel}" />
</FrameLayout>
<FrameLayout
android:id="@+id/theme_rayquaza"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/l1"
android:theme="@style/ThemeFoundationMD2.Rayquaza"
app:layout_constraintEnd_toEndOf="@+id/theme_default"
app:layout_constraintStart_toStartOf="@+id/theme_default"
app:layout_constraintTop_toBottomOf="@+id/theme_default">
<include
layout="@layout/item_theme"
theme="@{Theme.Rayquaza}"
viewModel="@{viewModel}" />
</FrameLayout>
<FrameLayout
android:id="@+id/theme_zapdos"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/l1"
android:theme="@style/ThemeFoundationMD2.Zapdos"
app:layout_constraintEnd_toEndOf="@+id/theme_amoled"
app:layout_constraintStart_toStartOf="@+id/theme_amoled"
app:layout_constraintTop_toBottomOf="@+id/theme_amoled">
<include
layout="@layout/item_theme"
theme="@{Theme.Zapdos}"
viewModel="@{viewModel}" />
</FrameLayout>
<FrameLayout
android:id="@+id/theme_charmeleon"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/l1"
android:theme="@style/ThemeFoundationMD2.Charmeleon"
app:layout_constraintEnd_toEndOf="@+id/theme_rayquaza"
app:layout_constraintStart_toStartOf="@+id/theme_rayquaza"
app:layout_constraintTop_toBottomOf="@+id/theme_rayquaza">
<include
layout="@layout/item_theme"
theme="@{Theme.Charmeleon}"
viewModel="@{viewModel}" />
</FrameLayout>
<FrameLayout
android:id="@+id/theme_mew"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/l1"
android:theme="@style/ThemeFoundationMD2.Mew"
app:layout_constraintEnd_toEndOf="@+id/theme_zapdos"
app:layout_constraintStart_toStartOf="@+id/theme_zapdos"
app:layout_constraintTop_toBottomOf="@+id/theme_zapdos">
<include
layout="@layout/item_theme"
theme="@{Theme.Mew}"
viewModel="@{viewModel}" />
</FrameLayout>
<FrameLayout
android:id="@+id/theme_salamence"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/l1"
android:theme="@style/ThemeFoundationMD2.Salamence"
app:layout_constraintEnd_toEndOf="@+id/theme_charmeleon"
app:layout_constraintStart_toStartOf="@+id/theme_charmeleon"
app:layout_constraintTop_toBottomOf="@+id/theme_charmeleon">
<include
layout="@layout/item_theme"
theme="@{Theme.Salamence}"
viewModel="@{viewModel}" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
2019-10-17 16:57:00 +00:00
</androidx.core.widget.NestedScrollView>
</layout>