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

267 lines
11 KiB
XML
Raw Normal View History

2019-09-28 09:05:31 +02:00
<?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"
2019-11-15 16:32:25 +01:00
xmlns:app="http://schemas.android.com/tools"
2019-09-28 09:05:31 +02:00
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
app:ignore="NamespaceTypo">
2019-09-28 15:16:19 +02:00
<LinearLayout
2019-09-28 09:05:31 +02:00
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="@dimen/toot_padding"
android:paddingTop="@dimen/toot_padding"
android:paddingRight="@dimen/toot_padding"
android:paddingBottom="@dimen/toot_padding">
2019-11-15 16:32:25 +01:00
2019-09-28 12:06:38 +02:00
<LinearLayout
android:id="@+id/pickup_picture"
2019-09-28 09:05:31 +02:00
android:layout_width="match_parent"
2019-09-28 15:16:19 +02:00
android:layout_height="300dp"
2019-09-28 12:06:38 +02:00
android:gravity="center"
2019-11-15 16:32:25 +01:00
android:orientation="vertical">
2019-09-28 12:06:38 +02:00
<TextView
2019-11-15 16:32:25 +01:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2019-09-28 12:06:38 +02:00
android:gravity="center"
2019-11-15 16:32:25 +01:00
android:text="@string/add_photo_pixelfed"
2019-09-28 12:06:38 +02:00
android:textSize="18sp"
2019-11-15 16:32:25 +01:00
android:textStyle="bold" />
<TextView
2019-09-28 12:06:38 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
2019-11-15 16:32:25 +01:00
android:text="@string/add_photo_indication_pixelfed"
android:textSize="14sp" />
2019-09-28 12:06:38 +02:00
</LinearLayout>
2019-11-15 16:32:25 +01:00
2019-09-28 15:16:19 +02:00
<com.smarteist.autoimageslider.SliderView
android:id="@+id/imageSlider"
android:layout_width="match_parent"
android:layout_height="300dp"
2019-11-15 16:32:25 +01:00
android:visibility="gone"
2019-09-28 15:16:19 +02:00
app:sliderAnimationDuration="1000"
app:sliderAutoCycleDirection="back_and_forth"
app:sliderAutoCycleEnabled="true"
app:sliderCircularHandlerEnabled="true"
app:sliderIndicatorAnimationDuration="600"
app:sliderIndicatorGravity="center_horizontal|bottom"
app:sliderIndicatorMargin="15dp"
app:sliderIndicatorOrientation="horizontal"
app:sliderIndicatorPadding="3dp"
app:sliderIndicatorRadius="2dp"
app:sliderIndicatorSelectedColor="#5A5A5A"
app:sliderIndicatorUnselectedColor="#FFF"
app:sliderScrollTimeInSec="1"
app:sliderStartAutoCycle="false" />
2019-11-15 16:32:25 +01:00
2019-09-28 15:16:19 +02:00
<LinearLayout
android:layout_width="match_parent"
2019-11-15 16:32:25 +01:00
android:layout_height="0dp"
2019-09-28 15:16:19 +02:00
android:layout_weight="1"
2019-11-15 16:32:25 +01:00
android:gravity="center_horizontal|bottom"
android:minHeight="30dp"
android:orientation="vertical">
<Button
android:id="@+id/upload_media"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:gravity="center"
android:text="@string/upload_media" />
2019-09-28 15:16:19 +02:00
</LinearLayout>
2019-11-15 16:32:25 +01:00
2020-01-19 15:10:49 +01:00
<CheckBox
android:id="@+id/pixelfed_story"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2020-05-16 20:00:45 +02:00
android:text="@string/pixelfed_story" />
2020-01-19 15:10:49 +01:00
<TextView
2020-05-16 20:00:45 +02:00
android:id="@+id/indication_story"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2020-01-19 15:10:49 +01:00
android:layout_marginTop="10dp"
android:background="@drawable/green_border"
android:gravity="center"
android:text="@string/story_indication"
2020-05-16 20:00:45 +02:00
android:textColor="@color/green"
android:visibility="gone" />
2019-09-28 09:05:31 +02:00
<ScrollView
android:id="@+id/composer_container"
android:layout_width="match_parent"
2019-09-28 12:06:38 +02:00
android:layout_height="wrap_content"
2019-09-28 09:05:31 +02:00
android:layout_marginLeft="0dp"
2019-11-15 16:32:25 +01:00
android:layout_marginEnd="0dp"
2019-09-28 09:05:31 +02:00
android:layout_marginRight="0dp"
android:layout_marginBottom="0dp"
android:fillViewport="true">
<app.fedilab.android.helper.MastalabAutoCompleteTextView
android:id="@+id/toot_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="top|start"
2019-09-28 18:49:38 +02:00
android:hint="@string/pixelfed_compose_placeholder"
2019-09-28 09:05:31 +02:00
android:inputType="textMultiLine|textCapSentences"
2019-09-28 15:16:19 +02:00
android:minLines="6" />
2019-09-28 09:05:31 +02:00
</ScrollView>
<LinearLayout
android:id="@+id/bottom_bar_tooting"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/progress_bar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<ProgressBar
android:id="@+id/upload_progress"
style="@style/Base.Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="false"
android:max="100"
android:progress="0" />
<TextView
android:id="@+id/toolbar_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:textColor="@color/dark_text"
android:textSize="12sp" />
</RelativeLayout>
<LinearLayout
android:id="@+id/compression_loader"
2019-11-15 16:32:25 +01:00
android:layout_width="match_parent"
2019-09-28 09:05:31 +02:00
android:layout_height="wrap_content"
2019-11-15 16:32:25 +01:00
android:layout_gravity="center_vertical"
2019-09-28 09:05:31 +02:00
android:layout_marginStart="@dimen/activity_vertical_margin"
2019-11-15 16:32:25 +01:00
android:layout_marginTop="3dp"
2019-09-28 09:05:31 +02:00
android:layout_marginEnd="@dimen/activity_vertical_margin"
android:layout_marginBottom="3dp"
2019-11-15 16:32:25 +01:00
android:orientation="horizontal"
android:visibility="gone">
2019-09-28 09:05:31 +02:00
<ProgressBar
android:layout_width="10dp"
2019-11-15 16:32:25 +01:00
android:layout_height="10dp"
android:layout_gravity="center" />
2019-09-28 09:05:31 +02:00
<TextView
2019-11-15 16:32:25 +01:00
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2019-09-28 09:05:31 +02:00
android:layout_gravity="center_vertical"
android:layout_marginStart="5dp"
android:gravity="center_vertical"
android:text="@string/please_wait_compression"
2019-11-15 16:32:25 +01:00
android:textColor="?colorAccent"
android:textSize="12sp" />
2019-09-28 09:05:31 +02:00
</LinearLayout>
<LinearLayout
2020-01-19 15:10:49 +01:00
android:id="@+id/button_container"
2019-09-28 09:05:31 +02:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageButton
android:id="@+id/toot_visibility"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:adjustViewBounds="true"
android:background="@color/transparent"
2019-09-28 12:06:38 +02:00
android:contentDescription="@string/post_visibility_tilte"
2019-09-28 09:05:31 +02:00
android:scaleType="centerCrop"
2019-11-09 16:02:19 +01:00
android:src="@drawable/ic_public"
2019-11-15 16:32:25 +01:00
android:tint="?attr/iconColor" />
2019-09-28 09:05:31 +02:00
<ImageButton
android:id="@+id/toot_emoji"
android:layout_width="28dp"
android:layout_height="28dp"
android:layout_gravity="center"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:adjustViewBounds="true"
android:background="@color/transparent"
android:contentDescription="@string/emoji_picker"
android:minWidth="0dp"
android:minHeight="0dp"
android:scaleType="centerCrop"
2019-11-09 16:02:19 +01:00
android:src="@drawable/ic_insert_emoticon"
2019-11-15 16:32:25 +01:00
android:tint="?attr/iconColor" />
2019-09-28 09:05:31 +02:00
2019-09-29 17:59:24 +02:00
<CheckBox
android:id="@+id/toot_sensitive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2019-11-15 16:32:25 +01:00
android:layout_gravity="center"
2019-11-10 15:05:14 +01:00
android:buttonTint="?attr/iconColor"
2019-11-15 16:32:25 +01:00
android:text="@string/cw"
android:textColor="?attr/iconColor" />
2019-09-29 17:59:24 +02:00
2020-01-19 15:10:49 +01:00
2019-09-28 09:05:31 +02:00
<TextView
android:id="@+id/toot_space_left"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_gravity="center"
2019-09-29 17:59:24 +02:00
android:layout_marginEnd="20dp"
2019-11-15 16:32:25 +01:00
android:layout_weight="1"
2019-09-29 17:59:24 +02:00
android:gravity="center_vertical|end"
2019-11-07 17:52:12 +01:00
android:textColor="?colorAccent" />
2019-09-28 09:05:31 +02:00
<Button
android:id="@+id/toot_it"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_gravity="end"
android:gravity="center"
android:padding="0dp"
2019-09-28 12:06:38 +02:00
android:text="@string/post" />
2019-09-28 09:05:31 +02:00
</LinearLayout>
</LinearLayout>
2019-09-28 15:16:19 +02:00
</LinearLayout>
2019-09-28 09:05:31 +02:00
</ScrollView>