<?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">
    <data>
        <variable
            name="viewModel"
            type="com.tommasoberlose.anotherwidget.ui.viewmodels.MainViewModel" />
        <variable
            name="isDarkModeEnabled"
            type="Boolean" />
        <import type="android.view.View" />
    </data>
    <com.tommasoberlose.anotherwidget.components.FixedFocusScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/scrollView"
        android:scrollbarThumbVertical="@color/colorPrimary">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingTop="8dp"
            android:paddingBottom="48dp"
            android:orientation="vertical">
            <androidx.appcompat.widget.AppCompatTextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/spacing_settings_header"
                android:paddingTop="16dp"
                android:paddingLeft="20dp"
                android:paddingRight="20dp"
                android:textAppearance="@style/AnotherWidget.Settings.Header" />
            <LinearLayout
                android:id="@+id/action_clock_bottom_margin_size"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="?android:attr/selectableItemBackground"
                android:clickable="true"
                android:focusable="true"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:paddingLeft="8dp"
                android:paddingTop="12dp"
                android:paddingRight="8dp"
                android:paddingBottom="12dp">
                <ImageView
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:padding="12dp"
                    android:src="@drawable/round_horizontal_split_24"
                    app:tint="@color/colorPrimaryText" />
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:paddingLeft="8dp"
                    android:paddingRight="8dp">
                    <TextView
                        style="@style/AnotherWidget.Settings.Title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/settings_clock_bottom_margin_title" />
                    <TextView
                        android:id="@+id/clock_bottom_margin_label"
                        style="@style/AnotherWidget.Settings.Subtitle"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content" />
                </LinearLayout>
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="12dp"
                android:paddingBottom="12dp"
                android:paddingLeft="8dp"
                android:paddingRight="8dp"
                android:clickable="true"
                android:focusable="true"
                android:background="?android:attr/selectableItemBackground"
                android:gravity="center_vertical"
                android:id="@+id/action_second_row_top_margin_size"
                android:orientation="horizontal">
                <ImageView
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:padding="12dp"
                    android:src="@drawable/round_format_line_spacing"
                    app:tint="@color/colorPrimaryText"/>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingLeft="8dp"
                    android:paddingRight="8dp"
                    android:orientation="vertical">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        style="@style/AnotherWidget.Settings.Title"
                        android:text="@string/settings_secondary_row_top_margin_title"/>
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:id="@+id/second_row_top_margin_label"
                        style="@style/AnotherWidget.Settings.Subtitle"/>
                </LinearLayout>
            </LinearLayout>
            <androidx.appcompat.widget.AppCompatTextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/preferences_header"
                android:paddingTop="16dp"
                android:paddingLeft="20dp"
                android:paddingRight="20dp"
                android:textAppearance="@style/AnotherWidget.Settings.Header" />
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="12dp"
                android:paddingBottom="12dp"
                android:paddingLeft="8dp"
                android:paddingRight="8dp"
                android:clickable="true"
                android:focusable="true"
                android:background="?android:attr/selectableItemBackground"
                android:gravity="center_vertical"
                android:id="@+id/action_widget_align"
                android:orientation="horizontal">
                <ImageView
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:padding="12dp"
                    android:id="@+id/widget_align_icon"
                    android:src="@drawable/round_align_horizontal_center_24"
                    app:tint="@color/colorPrimaryText"/>
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:paddingLeft="8dp"
                    android:paddingRight="8dp"
                    android:orientation="vertical">
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        style="@style/AnotherWidget.Settings.Title"
                        android:text="@string/settings_widget_align_title"/>
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:id="@+id/widget_align_label"
                        style="@style/AnotherWidget.Settings.Subtitle"/>
                </LinearLayout>
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="12dp"
                android:paddingBottom="12dp"
                android:paddingLeft="8dp"
                android:paddingRight="8dp"
                android:clickable="true"
                android:focusable="true"
                android:background="?android:attr/selectableItemBackground"
                android:gravity="center_vertical"
                android:id="@+id/action_show_dividers"
                android:orientation="horizontal">
                <ImageView
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:padding="12dp"
                    android:rotation="90"
                    android:src="@drawable/round_vertical_align_center_24"
                    app:tint="@color/colorPrimaryText"/>
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:paddingLeft="8dp"
                    android:paddingRight="8dp">
                    <TextView
                        style="@style/AnotherWidget.Settings.Title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/settings_show_dividers_title" />
                    <TextView
                        android:id="@+id/show_dividers_label"
                        style="@style/AnotherWidget.Settings.Subtitle"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content" />
                </LinearLayout>
                <com.kyleduo.switchbutton.SwitchButton
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    app:kswThumbWidth="16sp"
                    app:kswThumbHeight="16sp"
                    app:kswBackRadius="16dp"
                    app:kswTintColor="@color/colorAccent"
                    android:layout_marginEnd="16dp"
                    android:id="@+id/show_dividers_toggle"
                    android:buttonTint="@color/colorAccent" />
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:paddingTop="12dp"
                android:paddingBottom="12dp"
                android:paddingLeft="8dp"
                android:paddingRight="8dp"
                android:clickable="true"
                android:focusable="true"
                android:background="?android:attr/selectableItemBackground"
                android:gravity="center_vertical"
                android:id="@+id/action_background_color"
                android:orientation="horizontal">
                <ImageView
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:padding="12dp"
                    android:src="@drawable/round_aspect_ratio_24"
                    app:tint="@color/colorPrimaryText"/>
                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_weight="1"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:paddingLeft="8dp"
                    android:paddingRight="8dp">
                    <TextView
                        style="@style/AnotherWidget.Settings.Title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/settings_background_color_title" />

                    <TextView
                        android:id="@+id/background_color_label"
                        style="@style/AnotherWidget.Settings.Subtitle"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content" />
                </LinearLayout>
                <androidx.cardview.widget.CardView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:visibility="@{isDarkModeEnabled ? View.VISIBLE : View.GONE}"
                    app:cardCornerRadius="16dp"
                    android:layout_gravity="center_vertical"
                    app:cardBackgroundColor="@color/cardBorder"
                    android:layout_marginEnd="8dp"
                    app:cardElevation="0dp">
                    <androidx.appcompat.widget.AppCompatTextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="@color/colorPrimaryText"
                        android:textSize="12sp"
                        android:paddingTop="4dp"
                        android:paddingBottom="4dp"
                        android:paddingStart="16dp"
                        android:paddingEnd="16dp"
                        android:textAppearance="@style/TextAppearance.AppCompat.Button"
                        android:text="@string/settings_subtitle_dark_theme_dark"/>
                </androidx.cardview.widget.CardView>
            </LinearLayout>
        </LinearLayout>
    </com.tommasoberlose.anotherwidget.components.FixedFocusScrollView>
</layout>