<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Twidere - Twitter client for Android
  ~
  ~  Copyright (C) 2012-2015 Mariotaku Lee <mariotaku.lee@gmail.com>
  ~
  ~  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.
  ~
  ~  This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
  -->

<ScrollView
    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">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingBottom="@dimen/element_spacing_normal"
        android:paddingLeft="@dimen/element_spacing_large"
        android:paddingRight="@dimen/element_spacing_large"
        android:paddingTop="@dimen/element_spacing_normal">

        <RelativeLayout
            android:id="@+id/commentContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <org.mariotaku.twidere.view.ComposeEditText
                android:id="@+id/editComment"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:layout_alignParentLeft="true"
                android:layout_alignParentRight="true"
                android:layout_alignParentStart="true"
                android:completionThreshold="1"
                android:focusable="true"
                android:gravity="start|center_vertical"
                android:hint="@string/comment_hint"
                android:inputType="textMultiLine|textLongMessage|textCapSentences"
                android:visibility="visible"
                app:backgroundTint="?colorControlStateful">

                <requestFocus/>
            </org.mariotaku.twidere.view.ComposeEditText>

            <org.mariotaku.twidere.view.StatusTextCountView
                android:id="@+id/commentTextCount"
                android:layout_width="match_parent"
                android:layout_height="@dimen/element_size_normal"
                android:layout_alignLeft="@+id/editComment"
                android:layout_alignStart="@+id/editComment"
                android:layout_below="@+id/editComment"
                android:layout_toLeftOf="@+id/quoteOriginal"
                android:layout_toStartOf="@+id/quoteOriginal"
                android:gravity="center_vertical|start"
                android:paddingLeft="@dimen/element_spacing_normal"
                android:paddingRight="@dimen/element_spacing_normal"
                android:textColor="?android:textColorSecondary"
                tools:text="140"/>

            <android.support.v7.widget.AppCompatCheckBox
                android:id="@+id/quoteOriginal"
                android:layout_width="wrap_content"
                android:layout_height="@dimen/element_size_normal"
                android:layout_alignEnd="@+id/editComment"
                android:layout_alignRight="@+id/editComment"
                android:layout_below="@+id/editComment"
                android:focusable="false"
                android:gravity="center_vertical"
                android:text="@string/quote_original_status"
                android:visibility="gone"/>
        </RelativeLayout>

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <include layout="@layout/list_item_status"/>

            <FrameLayout
                android:id="@+id/loadProgress"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:minHeight="@dimen/element_size_mlarge"
                android:visibility="gone">

                <ProgressBar
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"/>
            </FrameLayout>
        </FrameLayout>
    </LinearLayout>

</ScrollView>