<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".ui.activities.PrefsActivity"
    android:orientation="vertical"
    android:background="@color/white">

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:minHeight="?attr/actionBarSize"
            android:theme="@style/Toolbar"
            app:layout_scrollFlags="scroll|enterAlways"
            app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"/>

    </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:paddingBottom="@dimen/activity_vertical_margin"

    tools:context="com.habitrpg.android.habitica.ui.activities.ChallengeFormActivity">

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

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="?colorPrimaryOffset"
            android:orientation="vertical"
            android:paddingLeft="@dimen/activity_horizontal_margin"
            android:paddingRight="@dimen/activity_horizontal_margin"
            android:paddingTop="22dp">


            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColorHint="?textColorPrimaryDark"
                app:hintTextAppearance="@style/TextAppearance.AppCompat"
                android:id="@+id/create_challenge_title_input_layout">

                <EditText
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="fill_horizontal"
                    android:hint="@string/new_challenge_title"
                    android:id="@+id/create_challenge_title"
                    android:textColor="@color/white"
                    android:textColorHighlight="?textColorPrimaryDark"
                    android:textColorHint="?textColorPrimaryDark"

                    tools:text="Get in shape"
                    android:inputType="text" />
            </com.google.android.material.textfield.TextInputLayout>

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColorHint="?textColorPrimaryDark"

                app:hintTextAppearance="@style/TextAppearance.AppCompat">

                <EditText
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/description_optional"
                    android:inputType="textMultiLine"

                    android:id="@+id/create_challenge_description"
                    android:maxLines="5"
                    android:minLines="3"
                    android:textColor="@color/white"
                    android:textColorHighlight="?textColorPrimaryDark"
                    android:textColorHint="?textColorPrimaryDark" />
            </com.google.android.material.textfield.TextInputLayout>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingLeft="@dimen/activity_horizontal_margin"
            android:paddingRight="@dimen/activity_horizontal_margin">
            <LinearLayout
                android:id="@+id/challenge_creation_views"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

            <TextView
                style="@style/Subheader2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="23dp"
                android:text="@string/gem_reward"
                android:textColor="#cc000000" />

            <TextView
                style="@style/Caption3"
                android:id="@+id/create_challenge_gem_error"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="23dp"
                android:text="@string/gem_reward"
                android:textColor="#f74e52"
                android:visibility="gone"
                tools:visibility="visible"/>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="28dp">

                <Button
                    android:id="@+id/challenge_add_gem_btn"
                    style="@style/Body1_Button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:drawableStart="@drawable/challenge_gem_add_button"/>

                <ImageView
                    android:id="@+id/gem_icon"
                    android:layout_width="18dp"
                    android:layout_height="18dp"
                    android:layout_gravity="center"/>

                <EditText
                    style="@style/Subheader2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:gravity="center"
                    android:inputType="number"
                    android:textColor="#8a000000"
                    android:text="0"
                    android:id="@+id/create_challenge_prize"
                    android:textAlignment="center" />

                <Button
                    android:id="@+id/challenge_remove_gem_btn"
                    style="@style/Body1_Button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:drawableEnd="@drawable/challenge_gem_remove_button"/>

            </LinearLayout>

            <TextView
                style="@style/Subheader2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="26dp"
                android:text="@string/location"
                android:textColor="#cc000000" />

            <Spinner
                android:id="@+id/challenge_location_spinner"
                style="@android:style/Widget.Material.Spinner.Underlined"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textColor="#8a000000"
                android:layout_marginTop="17dp" />

            <TextView
                style="@style/Subheader2"
                android:layout_width="wrap_content"
                android:layout_height="20dp"
                android:layout_marginTop="39dp"
                android:drawablePadding="12dp"
                android:drawableEnd="@drawable/ic_info_outline_black_24dp"
                android:gravity="center"
                android:text="@string/short_name"
                android:textColor="#cc000000" />

            <com.google.android.material.textfield.TextInputLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"

                android:id="@+id/create_challenge_tag_input_layout"
                app:hintTextAppearance="@style/TextAppearance.AppCompat">

                <EditText
                    android:id="@+id/create_challenge_tag"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"

                    android:hint="@string/identify_your_challenge_with_a_tag"
                    android:maxLines="1"
                    android:textColor="@color/gray_100"
                    android:textColorHint="#61000000" />
            </com.google.android.material.textfield.TextInputLayout>

            </LinearLayout>
            <TextView
                style="@style/Subheader2"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/tasks" />

            <TextView
                style="@style/Caption3"
                android:id="@+id/create_challenge_task_error"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="23dp"
                android:textColor="#f74e52"
                android:text="@string/challenge_create_error_no_tasks"
                android:visibility="gone"
                tools:visibility="visible"/>



        </LinearLayout>

        <androidx.recyclerview.widget.RecyclerView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:nestedScrollingEnabled="false"
            android:id="@+id/create_challenge_task_list">

        </androidx.recyclerview.widget.RecyclerView>
    </LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>