2017-01-08 09:24:02 +11:00
<?xml version="1.0" encoding="utf-8"?>
2018-12-18 01:25:35 +11:00
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android= "http://schemas.android.com/apk/res/android"
2017-01-17 05:15:42 +11:00
xmlns:app="http://schemas.android.com/apk/res-auto"
2017-11-02 06:59:29 +11:00
xmlns:tools="http://schemas.android.com/tools"
2017-01-17 05:15:42 +11:00
android:id="@+id/activity_compose"
android:layout_width="match_parent"
2017-03-08 00:09:33 +11:00
android:layout_height="match_parent">
2017-01-08 09:24:02 +11:00
2018-12-18 01:25:35 +11:00
<androidx.appcompat.widget.Toolbar
2018-04-14 06:37:21 +10:00
android:id="@+id/toolbar"
2017-01-17 05:15:42 +11:00
android:layout_width="match_parent"
2018-04-14 06:37:21 +10:00
android:layout_height="?attr/actionBarSize"
android:layout_marginBottom="8dp"
android:background="@android:color/transparent">
2017-03-11 04:38:49 +11:00
2019-05-26 16:46:08 +10:00
<ImageView
2018-04-14 06:37:21 +10:00
android:id="@+id/composeAvatar"
android:layout_width="?attr/actionBarSize"
2017-03-08 00:09:33 +11:00
android:layout_height="?attr/actionBarSize"
2018-04-14 06:37:21 +10:00
android:layout_gravity="end"
android:padding="8dp"
tools:ignore="ContentDescription" />
<!-- content description will be set in code -->
2019-06-24 18:33:05 +10:00
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/atButton"
style="?attr/image_button_style"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="end"
android:padding="8dp"
android:text="@string/at_symbol"
android:textStyle="bold"
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_large"
/>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/hashButton"
style="?attr/image_button_style"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="end"
android:padding="8dp"
android:text="@string/hash_symbol"
android:textStyle="bold"
android:textColor="?android:textColorTertiary"
android:textSize="?attr/status_text_large"
/>
2018-12-18 01:25:35 +11:00
</androidx.appcompat.widget.Toolbar>
2017-11-02 06:59:29 +11:00
2018-12-18 01:25:35 +11:00
<androidx.core.widget.NestedScrollView
2018-04-14 06:37:21 +10:00
android:layout_width="match_parent"
2018-05-17 03:14:53 +10:00
android:layout_height="@dimen/compose_activity_scrollview_height"
2018-12-18 01:25:35 +11:00
android:layout_marginTop="?attr/actionBarSize"
android:layout_marginBottom="52dp">
2017-11-02 06:59:29 +11:00
2017-04-21 15:08:38 +10:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
2017-11-02 06:59:29 +11:00
android:orientation="vertical">
2017-04-21 15:08:38 +10:00
2018-04-14 06:37:21 +10:00
<TextView
android:id="@+id/composeReplyView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
2018-12-18 01:25:35 +11:00
android:layout_marginBottom="6dp"
2018-04-14 06:37:21 +10:00
android:drawablePadding="6dp"
android:textSize="?attr/status_text_small"
android:textStyle="bold"
android:visibility="gone"
tools:text="Reply to @username"
tools:visibility="visible" />
2018-12-18 01:25:35 +11:00
<androidx.emoji.widget.EmojiTextView
2018-04-14 06:37:21 +10:00
android:id="@+id/composeReplyContentView"
2017-04-21 15:08:38 +10:00
android:layout_width="match_parent"
android:layout_height="wrap_content"
2018-04-14 06:37:21 +10:00
android:layout_marginBottom="2dp"
android:background="?attr/compose_reply_content_background"
android:lineSpacingMultiplier="1.1"
2017-04-21 15:08:38 +10:00
android:paddingLeft="16dp"
2018-04-14 06:37:21 +10:00
android:paddingTop="4dp"
2018-12-18 01:25:35 +11:00
android:paddingRight="16dp"
android:paddingBottom="4dp"
2018-04-14 06:37:21 +10:00
android:textSize="?attr/status_text_small"
android:visibility="gone"
tools:text="Post content which may be preeettyy long, so please, make sure there's enough room for everything, okay? Not kidding. I wish Eugen answered me more often, sigh."
tools:visibility="visible" />
2017-04-21 15:08:38 +10:00
2018-04-14 06:37:21 +10:00
<LinearLayout
android:id="@+id/composeContentWarningBar"
2017-04-21 15:08:38 +10:00
android:layout_width="match_parent"
2018-04-14 06:37:21 +10:00
android:layout_height="wrap_content"
android:orientation="vertical">
2017-04-21 15:08:38 +10:00
2018-12-18 01:25:35 +11:00
<androidx.emoji.widget.EmojiEditText
2018-04-14 06:37:21 +10:00
android:id="@+id/composeContentWarningField"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:background="@android:color/transparent"
android:hint="@string/hint_content_warning"
android:inputType="text|textCapSentences"
android:lineSpacingMultiplier="1.1"
android:maxLines="1"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:textColorHint="?android:attr/textColorTertiary"
android:textSize="?attr/status_text_medium" />
2017-04-21 15:08:38 +10:00
2018-04-14 06:37:21 +10:00
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginTop="8dp"
android:background="?android:attr/listDivider" />
</LinearLayout>
2017-01-08 09:24:02 +11:00
2017-05-15 20:07:01 +10:00
<com.keylesspalace.tusky.view.EditTextTyped
2018-04-14 06:37:21 +10:00
android:id="@+id/composeEditField"
2017-05-03 08:17:54 +10:00
android:layout_width="match_parent"
2018-04-14 06:37:21 +10:00
android:layout_height="wrap_content"
android:background="@null"
2017-11-02 06:59:29 +11:00
android:completionThreshold="2"
android:dropDownWidth="wrap_content"
2017-05-03 08:17:54 +10:00
android:hint="@string/hint_compose"
2017-12-01 06:12:09 +11:00
android:inputType="text|textMultiLine|textCapSentences"
2018-04-14 06:37:21 +10:00
android:lineSpacingMultiplier="1.1"
android:paddingLeft="16dp"
android:paddingTop="8dp"
2018-12-18 01:25:35 +11:00
android:paddingRight="16dp"
android:paddingBottom="8dp"
2018-04-14 06:37:21 +10:00
android:textColorHint="?android:attr/textColorTertiary"
2017-12-02 07:52:10 +11:00
android:textSize="?attr/status_text_large" />
2017-01-08 09:24:02 +11:00
2017-03-11 04:38:49 +11:00
<HorizontalScrollView
2017-03-08 00:09:33 +11:00
android:layout_width="match_parent"
2017-04-11 00:23:44 +10:00
android:layout_height="wrap_content"
2018-04-14 06:37:21 +10:00
android:scrollbars="none">
2017-04-11 00:23:44 +10:00
2017-03-11 04:38:49 +11:00
<LinearLayout
android:id="@+id/compose_media_preview_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
2018-04-14 06:37:21 +10:00
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingRight="16dp">
2017-01-08 09:24:02 +11:00
2017-03-11 04:38:49 +11:00
<!-- This is filled at runtime with ImageView's for each preview in the upload queue. -->
2017-01-08 09:24:02 +11:00
2017-03-11 04:38:49 +11:00
</LinearLayout>
2017-07-12 16:09:07 +10:00
2017-03-11 04:38:49 +11:00
</HorizontalScrollView>
2017-01-08 09:24:02 +11:00
2018-04-14 06:37:21 +10:00
</LinearLayout>
2018-12-18 01:25:35 +11:00
</androidx.core.widget.NestedScrollView>
2017-04-11 00:23:44 +10:00
2018-04-14 06:37:21 +10:00
<LinearLayout
android:id="@+id/addMediaBottomSheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:elevation="12dp"
android:orientation="vertical"
android:paddingStart="16dp"
android:paddingTop="8dp"
2018-12-18 01:25:35 +11:00
android:paddingEnd="16dp"
android:paddingBottom="52dp"
2018-04-14 06:37:21 +10:00
app:behavior_hideable="true"
app:behavior_peekHeight="0dp"
2018-12-18 01:25:35 +11:00
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
2017-03-08 00:09:33 +11:00
2018-04-14 06:37:21 +10:00
<TextView
android:id="@+id/action_photo_take"
android:layout_width="wrap_content"
2017-03-11 04:38:49 +11:00
android:layout_height="wrap_content"
2018-04-14 06:37:21 +10:00
android:drawablePadding="8dp"
android:padding="8dp"
android:text="@string/action_photo_take"
android:textSize="?attr/status_text_medium" />
2017-03-11 04:38:49 +11:00
2018-04-14 06:37:21 +10:00
<TextView
android:id="@+id/action_photo_pick"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="8dp"
android:padding="8dp"
android:text="@string/action_add_media"
android:textSize="?attr/status_text_medium" />
2019-08-23 04:30:08 +10:00
<TextView
android:id="@+id/action_add_poll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="8dp"
android:padding="8dp"
android:text="@string/action_add_poll"
android:textSize="?attr/status_text_medium" />
2018-04-14 06:37:21 +10:00
</LinearLayout>
2017-03-08 00:09:33 +11:00
2018-12-18 01:25:35 +11:00
<androidx.recyclerview.widget.RecyclerView
2018-04-14 06:37:21 +10:00
android:id="@+id/emojiView"
2018-12-18 07:58:52 +11:00
android:layout_width="match_parent"
2018-04-14 06:37:21 +10:00
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:clipToPadding="false"
android:elevation="12dp"
2018-12-18 07:58:52 +11:00
android:orientation="vertical"
2018-04-14 06:37:21 +10:00
android:paddingStart="16dp"
android:paddingTop="8dp"
2018-12-18 01:25:35 +11:00
android:paddingEnd="16dp"
android:paddingBottom="60dp"
2018-04-14 06:37:21 +10:00
app:behavior_hideable="true"
app:behavior_peekHeight="0dp"
2018-12-18 01:25:35 +11:00
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior" />
2017-03-11 04:38:49 +11:00
2018-04-14 06:37:21 +10:00
<com.keylesspalace.tusky.view.ComposeOptionsView
android:id="@+id/composeOptionsBottomSheet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:colorBackground"
android:elevation="12dp"
android:paddingStart="16dp"
android:paddingTop="8dp"
2018-12-18 01:25:35 +11:00
android:paddingEnd="16dp"
android:paddingBottom="52dp"
2018-04-14 06:37:21 +10:00
app:behavior_hideable="true"
app:behavior_peekHeight="0dp"
2018-12-18 01:25:35 +11:00
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior" />
2017-07-12 16:09:07 +10:00
2018-04-14 06:37:21 +10:00
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="?android:colorBackground"
android:elevation="12dp"
android:gravity="center_vertical"
android:paddingStart="8dp"
2018-12-18 01:25:35 +11:00
android:paddingTop="4dp"
android:paddingEnd="8dp"
android:paddingBottom="4dp">
2018-04-14 06:37:21 +10:00
<ImageButton
android:id="@+id/composeAddMediaButton"
style="?attr/image_button_style"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginEnd="4dp"
android:contentDescription="@string/action_add_media"
android:padding="4dp"
android:tooltipText="@string/action_add_media"
app:srcCompat="@drawable/ic_attach_file_24dp" />
<ImageButton
android:id="@+id/composeToggleVisibilityButton"
style="?attr/image_button_style"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginEnd="4dp"
android:contentDescription="@string/action_toggle_visibility"
android:padding="4dp"
android:tooltipText="@string/action_toggle_visibility"
tools:src="@drawable/ic_public_24dp" />
<ImageButton
android:id="@+id/composeHideMediaButton"
2018-12-18 01:25:35 +11:00
style="?attr/image_button_style"
2018-04-14 06:37:21 +10:00
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="4dp"
android:contentDescription="@string/action_hide_media"
android:padding="4dp"
android:tooltipText="@string/action_hide_media"
android:visibility="gone"
tools:src="@drawable/ic_eye_24dp" />
2019-04-02 04:19:37 +11:00
<ImageButton
2018-04-14 06:37:21 +10:00
android:id="@+id/composeContentWarningButton"
style="?attr/image_button_style"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginEnd="4dp"
android:contentDescription="@string/action_content_warning"
android:padding="4dp"
2019-04-02 04:19:37 +11:00
android:tooltipText="@string/action_content_warning"
app:srcCompat="@drawable/ic_cw_24dp"/>
2018-04-14 06:37:21 +10:00
<ImageButton
android:id="@+id/composeEmojiButton"
style="?attr/image_button_style"
2018-05-17 03:14:53 +10:00
android:layout_width="36dp"
android:layout_height="36dp"
2018-04-14 06:37:21 +10:00
android:layout_marginEnd="4dp"
android:contentDescription="@string/action_emoji_keyboard"
android:padding="4dp"
android:tooltipText="@string/action_emoji_keyboard"
app:srcCompat="@drawable/ic_emoji_24dp" />
2018-12-18 01:25:35 +11:00
<Space
2018-04-14 06:37:21 +10:00
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView
android:id="@+id/composeCharactersLeftView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="?android:textColorTertiary"
2018-04-23 17:26:03 +10:00
android:textSize="?attr/status_text_medium"
2018-05-17 03:14:53 +10:00
tools:text="500" />
2018-04-14 06:37:21 +10:00
<com.keylesspalace.tusky.view.TootButton
android:id="@+id/composeTootButton"
2018-12-18 01:25:35 +11:00
style="@style/TuskyButton"
2018-04-14 06:37:21 +10:00
android:layout_width="@dimen/toot_button_width"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:textSize="?attr/status_text_medium" />
2017-01-08 09:24:02 +11:00
2017-07-12 16:09:07 +10:00
</LinearLayout>
2017-03-08 00:09:33 +11:00
2018-12-18 01:25:35 +11:00
</androidx.coordinatorlayout.widget.CoordinatorLayout>