fedilab-Android-App/app/src/main/res/layout/activity_toot.xml

164 lines
7.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Thomas Schneider
This file is a part of Mastalab
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.
Mastalab 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 Mastalab; if not,
see <http://www.gnu.org/licenses>.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:fillViewport="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="20dp"
android:paddingBottom="20dp"
android:paddingLeft="@dimen/toot_padding"
android:paddingRight="@dimen/toot_padding"
android:orientation="vertical">
<EditText
android:id="@+id/toot_cw_content"
android:layout_marginTop="20dp"
android:animateLayoutChanges="true"
android:visibility="gone"
android:hint="@string/toot_cw_placeholder"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<fr.gouv.etalab.mastodon.helper.MastalabAutoCompleteTextView
android:layout_marginTop="10dp"
android:id="@+id/toot_content"
android:gravity="top|start"
android:inputType="textMultiLine|textCapSentences"
android:hint="@string/toot_placeholder"
android:layout_width="match_parent"
android:minLines="4"
android:layout_weight="1"
android:layout_height="0dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:visibility="gone"
android:id="@+id/progress_bar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ProgressBar
style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal"
android:indeterminate="false"
android:id="@+id/upload_progress"
android:layout_width="match_parent"
android:max="100"
android:progress="0"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/toolbar_text"
android:layout_width="match_parent"
android:textColor="@color/dark_text"
android:gravity="center"
android:textSize="12sp"
android:layout_gravity="center"
android:layout_height="wrap_content" />
</RelativeLayout>
<HorizontalScrollView
android:id="@+id/picture_scrollview"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<LinearLayout
android:padding="5dp"
android:id="@+id/toot_picture_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxHeight="100dp"
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:orientation="horizontal"
>
</LinearLayout>
</HorizontalScrollView>
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/toot_picture"
android:layout_width="50dp"
android:layout_height="wrap_content"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:src="@drawable/ic_insert_photo"
android:contentDescription="@string/toot_select_image" />
<ImageButton
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:id="@+id/toot_visibility"
android:layout_width="50dp"
android:layout_height="wrap_content"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:src="@drawable/ic_public"
android:contentDescription="@string/toot_visibility_tilte" />
<Button
android:id="@+id/toot_cw"
android:padding="5dp"
android:text="@string/cw"
android:layout_gravity="center"
style="?attr/borderlessColored"
android:layout_width="40dp"
android:layout_height="40dp" />
<ImageButton
android:id="@+id/toot_emoji"
android:minHeight="0dp"
android:minWidth="0dp"
android:layout_gravity="center"
android:padding="2dp"
android:scaleType="fitXY"
android:src="@drawable/emoji_one_category_smileysandpeople"
style="?attr/borderlessColored"
android:layout_width="30dp"
android:layout_height="30dp"
android:contentDescription="@string/emoji_picker"
/>
<TextView
android:id="@+id/toot_space_left"
android:layout_width="0dp"
android:textColor="?colorAccent"
android:layout_weight="1"
android:gravity="center"
android:layout_gravity="center"
android:layout_height="40dp" />
<Button
android:id="@+id/toot_it"
android:padding="5dp"
android:text="@string/toot_it"
android:layout_gravity="end"
android:gravity="center"
style="@style/Base.Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<CheckBox
android:text="@string/toot_sensitive"
android:visibility="gone"
android:id="@+id/toot_sensitive"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
</ScrollView>