<?xml version="1.0" encoding="utf-8"?><!--
  ~ Twidere - Twitter client for Android
  ~
  ~  Copyright (C) 2012-2014 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/>.
  -->

<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="wrap_content"
    android:layout_height="wrap_content"
    android:minWidth="@dimen/compose_min_width"
    android:orientation="vertical">

    <org.mariotaku.twidere.view.MaxHeightScrollView
        android:id="@+id/composeContent"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:maxHeight="240dp"
        tools:maxHeight="@null">

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

            <org.mariotaku.twidere.view.FixedTextView
                android:id="@+id/replyLabel"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="?android:panelColorBackground"
                android:ellipsize="end"
                android:maxLines="1"
                android:padding="@dimen/element_spacing_normal"
                tools:text="In reply to name: A quick brown fox jumps over the lazy dog"/>

            <org.mariotaku.twidere.view.ExtendedLinearLayout
                android:id="@+id/editTextContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:minHeight="160dp"
                android:orientation="vertical"
                android:paddingBottom="@dimen/element_spacing_normal">

                <org.mariotaku.twidere.view.ComposeEditText
                    android:id="@+id/editSummary"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@null"
                    android:gravity="top"
                    android:hint="@string/label_content_warning"
                    android:padding="@dimen/element_spacing_normal"
                    android:visibility="gone"/>

                <org.mariotaku.twidere.view.ComposeEditText
                    android:id="@+id/editText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@null"
                    android:gravity="top"
                    android:hint="@string/label_status_hint"
                    android:inputType="textMultiLine|textLongMessage|textCapSentences"
                    android:padding="@dimen/element_spacing_normal"/>

                <org.mariotaku.twidere.view.FixedTextView
                    android:id="@+id/hintLabel"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/element_spacing_normal"
                    android:textAppearance="?android:textAppearanceSmall"
                    android:visibility="gone"/>

                <org.mariotaku.twidere.view.ExtendedRecyclerView
                    android:id="@+id/attachedMediaPreview"
                    android:layout_width="match_parent"
                    android:layout_height="128dp"
                    android:clipChildren="false"
                    android:paddingLeft="@dimen/element_spacing_small"
                    android:paddingRight="@dimen/element_spacing_small"
                    tools:listitem="@layout/grid_item_media_editor"/>

                <org.mariotaku.twidere.view.ActionIconThemedTextView
                    android:id="@+id/locationLabel"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawableLeft="@drawable/ic_action_location"
                    android:drawableStart="@drawable/ic_action_location"
                    android:gravity="center_vertical"
                    android:maxLines="1"
                    android:textColor="?android:textColorSecondary"
                    app:iabColor="?android:textColorSecondary"
                    app:iabIconHeight="20dp"
                    app:iabIconWidth="20dp"
                    tools:text="11.4, 51.4"/>

                <org.mariotaku.twidere.view.ActionIconThemedTextView
                    android:id="@+id/visibilityLabel"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:drawableLeft="@drawable/ic_action_web"
                    android:drawableStart="@drawable/ic_action_web"
                    android:gravity="center_vertical"
                    android:maxLines="1"
                    android:textColor="?android:textColorSecondary"
                    app:iabColor="?android:textColorSecondary"
                    app:iabIconHeight="20dp"
                    app:iabIconWidth="20dp"
                    tools:text="@string/label_status_visibility_public"/>

            </org.mariotaku.twidere.view.ExtendedLinearLayout>
        </LinearLayout>
    </org.mariotaku.twidere.view.MaxHeightScrollView>

    <ProgressBar
        android:id="@+id/composeProgress"
        style="?android:progressBarStyleHorizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:indeterminate="true"
        android:padding="0dp"
        android:visibility="gone"
        tools:visibility="visible"/>

    <RelativeLayout
        android:id="@+id/composeBottomBar"
        android:layout_width="match_parent"
        android:layout_height="?actionBarSize"
        android:background="?android:panelColorBackground"
        android:baselineAligned="false">

        <org.mariotaku.twidere.view.ExtendedRecyclerView
            android:id="@+id/accountSelector"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_toEndOf="@+id/accountSelectorButton"
            android:layout_toRightOf="@id/accountSelectorButton"
            android:clickable="true"
            android:focusable="true"
            android:overScrollMode="never"
            android:visibility="gone"
            tools:listitem="@layout/adapter_item_compose_account"/>

        <RelativeLayout
            android:id="@+id/composeMenu"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_toEndOf="@+id/accountSelectorButton"
            android:layout_toRightOf="@id/accountSelectorButton"
            android:clickable="true"
            android:focusable="true"
            android:visibility="visible">

            <HorizontalScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_alignParentLeft="true"
                android:layout_alignParentStart="true"
                android:layout_toLeftOf="@+id/updateStatus"
                android:layout_toStartOf="@+id/updateStatus"
                android:overScrollMode="never"
                android:scrollbars="none">

                <androidx.appcompat.widget.TwidereActionMenuView
                    android:id="@+id/menuBar"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_gravity="center"
                    android:background="@null"/>
            </HorizontalScrollView>

            <LinearLayout
                android:id="@+id/updateStatus"
                style="?actionButtonStyle"
                android:layout_width="wrap_content"
                android:layout_height="match_parent"
                android:layout_alignParentEnd="true"
                android:layout_alignParentRight="true"
                android:contentDescription="@string/action_send"
                android:gravity="center"
                android:orientation="horizontal"
                android:paddingBottom="@dimen/element_spacing_normal"
                android:paddingEnd="@dimen/element_spacing_normal"
                android:paddingLeft="@dimen/element_spacing_large"
                android:paddingRight="@dimen/element_spacing_normal"
                android:paddingStart="@dimen/element_spacing_large"
                android:paddingTop="@dimen/element_spacing_normal">

                <org.mariotaku.twidere.view.StatusTextCountView
                    android:id="@+id/statusTextCount"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:minWidth="@dimen/element_size_small"
                    android:textAppearance="?android:textAppearanceSmall"
                    android:textColor="?android:textColorSecondary"
                    tools:text="140"/>

                <org.mariotaku.twidere.view.IconActionView
                    android:id="@+id/updateStatusIcon"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:contentDescription="@string/action_send"
                    android:cropToPadding="false"
                    android:padding="@dimen/element_spacing_xsmall"
                    android:scaleType="centerCrop"
                    android:src="@drawable/ic_action_send"
                    app:iabColor="?android:textColorSecondary"
                    tools:tint="?android:textColorSecondary"/>

            </LinearLayout>
        </RelativeLayout>

        <RelativeLayout
            android:id="@+id/accountSelectorButton"
            style="?actionButtonStyle"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:clickable="true"
            android:focusable="true"
            android:paddingBottom="@dimen/element_spacing_msmall"
            android:paddingEnd="@dimen/element_spacing_msmall"
            android:paddingLeft="@dimen/element_spacing_msmall"
            android:paddingRight="@dimen/element_spacing_msmall"
            android:paddingStart="@dimen/element_spacing_msmall"
            android:paddingTop="@dimen/element_spacing_msmall">

            <org.mariotaku.twidere.view.SquareFrameLayout
                android:id="@+id/accountProfileImageFrame"
                android:layout_width="wrap_content"
                android:layout_height="match_parent">

                <org.mariotaku.twidere.view.ProfileImageView
                    android:id="@+id/accountProfileImage"
                    style="?profileImageStyle"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_gravity="center"
                    app:sivBackgroundColor="?android:colorBackground"
                    app:sivBorder="true"
                    app:sivBorderWidth="@dimen/line_width_compose_account_profile_image"
                    tools:src="@drawable/ic_profile_image_twidere"/>
            </org.mariotaku.twidere.view.SquareFrameLayout>

            <org.mariotaku.twidere.view.BadgeView
                android:id="@+id/accountsCount"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_alignBottom="@+id/accountProfileImageFrame"
                android:layout_alignEnd="@+id/accountProfileImageFrame"
                android:layout_alignLeft="@+id/accountProfileImageFrame"
                android:layout_alignRight="@+id/accountProfileImageFrame"
                android:layout_alignStart="@+id/accountProfileImageFrame"
                android:layout_alignTop="@+id/accountProfileImageFrame"
                android:layout_gravity="center"
                android:contentDescription="@string/select_accounts_for_compose"
                android:textColor="?android:colorForeground"/>

        </RelativeLayout>

    </RelativeLayout>
</LinearLayout>