<?xml version="1.0" encoding="utf-8"?><!--
    Copyright 2017 Thomas Schneider

    This file is a part of Fedilab

    This program is free software; you can redistribute it and/or modify it under the terms of the
    GNU General Public License as published by the Free Software Foundation; either version 3 of the
    License, or (at your option) any later version.

    Fedilab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
    the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
    Public License for more details.

    You should have received a copy of the GNU General Public License along with Fedilab; if not,
    see <http://www.gnu.org/licenses>.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/swipeContainer"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/drawer_padding"
    android:paddingRight="@dimen/drawer_padding">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:orientation="vertical"
        android:padding="@dimen/fab_margin"
        tools:ignore="UselessParent">

        <!-- Screen name -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">
            <!-- Profile picture -->
            <ImageView
                android:id="@+id/set_profile_picture"
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:layout_gravity="center"
                android:contentDescription="@string/profile_picture"
                android:scaleType="fitXY" />

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

                <EditText
                    android:id="@+id/set_profile_name"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:inputType="textPersonName"
                    android:singleLine="true" />

                <Button
                    android:id="@+id/set_change_profile_picture"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="5dp"
                    android:text="@string/choose_picture"
                    android:textAllCaps="false"
                    android:textSize="12sp" />
            </LinearLayout>
        </LinearLayout>
        <!-- Description -->
        <EditText
            android:id="@+id/set_profile_description"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:hint="@string/set_profile_description"
            android:lines="4"
            android:maxLines="5"
            android:minLines="4" />
        <!-- Header picture -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <ImageView
                android:id="@+id/set_header_picture"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:contentDescription="@string/profile_banner"
                android:minHeight="100dp"
                android:scaleType="fitXY" />

            <TextView
                android:id="@+id/set_header_picture_overlay"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_gravity="center"
                android:gravity="center"
                android:text="@string/set_header_picture_overlay"
                android:textSize="16sp"
                android:textStyle="italic"
                android:visibility="gone" />
        </LinearLayout>


        <Button
            android:id="@+id/set_change_header_picture"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginTop="5dp"
            android:gravity="center"
            android:text="@string/choose_picture"
            android:textAllCaps="false"
            android:textSize="12sp" />

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

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

                <EditText
                    android:id="@+id/cf_key_1"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:importantForAutofill="noExcludeDescendants"
                    android:inputType="text" />

                <EditText
                    android:id="@+id/cf_val_1"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:importantForAutofill="noExcludeDescendants"
                    android:inputType="text" />
            </LinearLayout>

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

                <EditText
                    android:id="@+id/cf_key_2"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:inputType="text" />

                <EditText
                    android:id="@+id/cf_val_2"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:inputType="text" />
            </LinearLayout>

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

                <EditText
                    android:id="@+id/cf_key_3"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:inputType="text" />

                <EditText
                    android:id="@+id/cf_val_3"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:inputType="text" />
            </LinearLayout>

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

                <EditText
                    android:id="@+id/cf_key_4"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:inputType="text" />

                <EditText
                    android:id="@+id/cf_val_4"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:inputType="text" />
            </LinearLayout>

        </LinearLayout>
        <!-- Lock the account -->
        <CheckBox
            android:id="@+id/set_lock_account"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:text="@string/set_lock_account" />

        <!-- Sensitive content -->
        <CheckBox
            android:id="@+id/set_sensitive_content"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="10dp"
            android:text="@string/set_sensitive_content" />

        <Button
            android:id="@+id/set_profile_save"
            style="@style/Base.Widget.AppCompat.Button.Colored"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:layout_marginTop="5dp"
            android:gravity="center"
            android:maxWidth="150dp"
            android:text="@string/set_save_changes" />
    </LinearLayout>
</ScrollView>

