<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/llContent"
    android:layout_width="match_parent"
    android:layout_height="match_parent"

    android:orientation="vertical"

    >

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="4dp"
        android:paddingStart="12dp"
        android:paddingEnd="12dp"
        android:text="@string/preview" />

    <TextView
        android:id="@+id/tvPreview"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:paddingStart="12dp"
        android:paddingTop="6dp"
        android:paddingEnd="12dp"
        android:paddingBottom="6dp"
        android:textSize="20sp"
        tools:text="preview..." />

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:fadeScrollbars="false"
        android:fillViewport="true">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="12dp">

            <View style="@style/setting_divider" />

            <TextView
                style="@style/setting_row_label"
                android:text="@string/acct" />

            <LinearLayout style="@style/setting_row_form">

                <TextView
                    android:id="@+id/tvAcct"
                    style="@style/setting_horizontal_stretch" />

            </LinearLayout>

            <View style="@style/setting_divider" />

            <TextView
                style="@style/setting_row_label"
                android:labelFor="@+id/etNickname"
                android:text="@string/nickname" />

            <LinearLayout style="@style/setting_row_form">

                <EditText
                    android:id="@+id/etNickname"
                    style="@style/setting_horizontal_stretch"
                    android:importantForAutofill="no"
                    android:inputType="text"
                    android:maxLines="1" />

            </LinearLayout>

            <View style="@style/setting_divider" />

            <TextView
                style="@style/setting_row_label"
                android:text="@string/text_color" />

            <LinearLayout style="@style/setting_row_form">

                <Button
                    android:id="@+id/btnTextColorEdit"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/edit"
                    android:textAllCaps="false" />

                <Button
                    android:id="@+id/btnTextColorReset"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/reset"
                    android:textAllCaps="false" />

            </LinearLayout>

            <View style="@style/setting_divider" />

            <TextView
                style="@style/setting_row_label"
                android:text="@string/background_color" />

            <LinearLayout style="@style/setting_row_form">

                <Button
                    android:id="@+id/btnBackgroundColorEdit"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/edit"
                    android:textAllCaps="false" />

                <Button
                    android:id="@+id/btnBackgroundColorReset"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/reset"
                    android:textAllCaps="false" />

            </LinearLayout>

            <View style="@style/setting_divider" />

            <LinearLayout
                android:id="@+id/llNotificationSound"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <TextView
                    style="@style/setting_row_label"
                    android:text="@string/notification_sound_before_oreo" />

                <LinearLayout style="@style/setting_row_form">

                    <Button
                        android:id="@+id/btnNotificationSoundEdit"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/edit"
                        android:textAllCaps="false" />

                    <Button
                        android:id="@+id/btnNotificationSoundReset"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/reset"
                        android:textAllCaps="false" />

                </LinearLayout>

                <View style="@style/setting_divider" />
            </LinearLayout>
        </LinearLayout>
    </ScrollView>

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="@string/nickname_applied_after_reload"
        android:textSize="12sp" />

    <LinearLayout
        style="?android:attr/buttonBarStyle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:measureWithLargestChild="true">

        <Button
            android:id="@+id/btnSave"
            style="?android:attr/buttonBarButtonStyle"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/save"
            android:textAllCaps="false" />

        <Button
            android:id="@+id/btnDiscard"
            style="?android:attr/buttonBarButtonStyle"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/discard"
            android:textAllCaps="false" />
    </LinearLayout>
</LinearLayout>