Emoji Support for all user input

All text that can be generated by users will show emoji from the
shipped sprites.

For all messages and posts, the custom emoji keyboard is now available.

This also disables menu actions rather than hiding them and thus
closes #677

Included is a fix for a regression that was not showing the keyboard
automatically in forums and thus
closes #676
This commit is contained in:
Torsten Grote
2016-09-26 17:58:26 -03:00
parent a422c626b3
commit f8e0441de8
42 changed files with 587 additions and 435 deletions

View File

@@ -24,7 +24,7 @@
<include layout="@layout/contact_avatar_status"/>
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/contactName"
style="@style/TextAppearance.AppCompat.Widget.ActionBar.Title.Inverse"
android:layout_width="wrap_content"
@@ -50,6 +50,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/button_bar_background"
android:elevation="@dimen/margin_tiny"/>
android:elevation="@dimen/margin_tiny"
app:hint="@string/message_hint"/>
</LinearLayout>

View File

@@ -18,6 +18,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/button_bar_background"
android:elevation="@dimen/margin_tiny"/>
android:elevation="@dimen/margin_tiny"
app:hint="@string/forum_new_message_hint"/>
</LinearLayout>

View File

@@ -1,56 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<FrameLayout
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"
android:orientation="vertical"
android:padding="@dimen/margin_small"
tools:context=".android.blogs.WriteBlogPostActivity">
<android.support.design.widget.TextInputLayout
android:id="@+id/titleLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:counterEnabled="true"
app:counterOverflowTextAppearance="@style/BriarTextCounter.Overflow">
<android.support.design.widget.TextInputEditText
android:id="@+id/titleInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/blogs_write_blog_post_title_hint"
android:inputType="textCapWords|textCapSentences|textAutoCorrect"/>
</android.support.design.widget.TextInputLayout>
<EditText
<org.briarproject.android.view.LargeTextInputView
android:id="@+id/bodyInput"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
android:gravity="bottom"
android:hint="@string/blogs_write_blog_post_body_hint"
android:inputType="textMultiLine|textLongMessage|textCapSentences|textAutoCorrect">
<requestFocus/>
</EditText>
<Button
android:id="@+id/publishButton"
style="@style/BriarButton"
android:enabled="false"
android:text="@string/blogs_publish_blog_post"/>
app:buttonText="@string/blogs_publish_blog_post"
app:hint="@string/blogs_write_blog_post_body_hint"
app:fillHeight="true"/>
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyle"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"/>
android:visibility="invisible"/>
</LinearLayout>
</FrameLayout>

View File

@@ -26,7 +26,7 @@
android:visibility="invisible"
tools:ignore="ContentDescription"/>
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/authorName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -1,46 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
android:id="@+id/scrollView"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/window_background">
android:layout_height="match_parent"
android:orientation="vertical">
<RelativeLayout
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/window_background">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include
android:id="@+id/postLayout"
layout="@layout/list_item_blog_post"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_small"/>
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"/>
</RelativeLayout>
</ScrollView>
<org.briarproject.android.view.LargeTextInputView
android:id="@+id/inputText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/margin_small">
android:gravity="bottom"
app:buttonText="@string/blogs_reblog_button"
app:maxLines="5"
app:hint="@string/blogs_reblog_comment_hint"/>
<include
android:id="@+id/postLayout"
layout="@layout/list_item_blog_post"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"/>
<EditText
android:id="@+id/inputText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/postLayout"
android:layout_margin="@dimen/listitem_vertical_margin"
android:gravity="bottom"
android:hint="@string/blogs_reblog_comment_hint"
android:inputType="textShortMessage|textMultiLine|textCapSentences|textAutoCorrect"/>
<Button
android:id="@+id/publishButton"
style="@style/BriarButton"
android:layout_below="@+id/inputText"
android:enabled="false"
android:text="@string/blogs_reblog_button"/>
</RelativeLayout>
</ScrollView>
</LinearLayout>

View File

@@ -1,41 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
android:orientation="vertical">
<LinearLayout
<TextView
android:id="@+id/introductionText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/margin_activity_horizontal"
android:orientation="vertical">
android:text="@string/forum_share_message"
android:textColor="@color/briar_text_primary"
android:textSize="@dimen/text_size_medium"/>
<TextView
android:id="@+id/introductionText"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="@dimen/margin_medium"
android:layout_weight="1"
android:gravity="top"
android:textSize="@dimen/text_size_medium"
android:textColor="@color/briar_text_primary"
android:text="@string/forum_share_message"/>
<org.briarproject.android.view.LargeTextInputView
android:id="@+id/invitationMessageView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="bottom"
app:buttonText="@string/forum_share_button"
app:fillHeight="true"
app:hint="@string/introduction_message_hint"/>
<EditText
android:id="@+id/invitationMessageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_medium"
android:gravity="bottom"
android:hint="@string/introduction_message_hint"
android:inputType="text|textMultiLine|textCapSentences"/>
<Button
android:id="@+id/shareForumButton"
style="@style/BriarButton"
android:text="@string/forum_share_button"/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</LinearLayout>

View File

@@ -1,128 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView
<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="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
android:orientation="vertical">
<LinearLayout
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="@dimen/margin_activity_horizontal">
android:layout_height="0dp"
android:layout_weight="1">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/introductionIcon"
android:gravity="top|center_horizontal"
android:orientation="vertical">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/avatarContact1"
style="@style/BriarAvatar"
android:layout_width="@dimen/listitem_picture_size"
android:layout_height="@dimen/listitem_picture_size"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
tools:src="@drawable/ic_launcher"/>
<TextView
android:id="@+id/nameContact1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_small"
android:gravity="center"
android:textColor="@color/briar_text_primary"
android:textSize="@dimen/text_size_tiny"
tools:text="Contact 1"/>
</LinearLayout>
<ImageView
android:id="@+id/introductionIcon"
android:layout_width="@dimen/listitem_picture_size"
android:layout_height="@dimen/listitem_picture_size"
android:layout_centerHorizontal="true"
android:src="@drawable/ic_contact_introduction"
tools:ignore="ContentDescription"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/introductionIcon"
android:layout_toRightOf="@+id/introductionIcon"
android:gravity="top|center_horizontal"
android:orientation="vertical">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/avatarContact2"
style="@style/BriarAvatar"
android:layout_width="@dimen/listitem_picture_size"
android:layout_height="@dimen/listitem_picture_size"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
android:transitionName="avatar"
tools:src="@drawable/ic_launcher"/>
<TextView
android:id="@+id/nameContact2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_small"
android:gravity="center"
android:textColor="@color/briar_text_primary"
android:textSize="@dimen/text_size_tiny"
tools:text="Contact 2"/>
</LinearLayout>
</RelativeLayout>
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
tools:visibility="gone"/>
<TextView
android:id="@+id/introductionText"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="@dimen/margin_medium"
android:layout_weight="1"
android:gravity="top"
android:textColor="@color/briar_text_secondary"
android:textSize="@dimen/text_size_medium"
tools:text="@string/introduction_message_text"/>
<EditText
android:id="@+id/introductionMessageView"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_medium"
android:gravity="bottom"
android:hint="@string/introduction_message_hint"
android:inputType="text|textMultiLine|textCapSentences"
android:textColor="@color/briar_text_primary"
android:textColorHint="@color/briar_text_tertiary"/>
android:layout_margin="@dimen/margin_activity_horizontal"
android:orientation="vertical">
<Button
android:id="@+id/makeIntroductionButton"
style="@style/BriarButton"
android:text="@string/introduction_button"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/introductionIcon"
android:gravity="top|center_horizontal"
android:orientation="vertical">
</android.support.v4.widget.NestedScrollView>
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/avatarContact1"
style="@style/BriarAvatar"
android:layout_width="@dimen/listitem_picture_size"
android:layout_height="@dimen/listitem_picture_size"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
tools:src="@drawable/ic_launcher"/>
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/nameContact1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_small"
android:gravity="center"
android:textColor="@color/briar_text_primary"
android:textSize="@dimen/text_size_tiny"
tools:text="Contact 1"/>
</LinearLayout>
<ImageView
android:id="@+id/introductionIcon"
android:layout_width="@dimen/listitem_picture_size"
android:layout_height="@dimen/listitem_picture_size"
android:layout_centerHorizontal="true"
android:src="@drawable/ic_contact_introduction"
tools:ignore="ContentDescription"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toEndOf="@+id/introductionIcon"
android:layout_toRightOf="@+id/introductionIcon"
android:gravity="top|center_horizontal"
android:orientation="vertical">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/avatarContact2"
style="@style/BriarAvatar"
android:layout_width="@dimen/listitem_picture_size"
android:layout_height="@dimen/listitem_picture_size"
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:layout_marginStart="@dimen/listitem_horizontal_margin"
android:transitionName="avatar"
tools:src="@drawable/ic_launcher"/>
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/nameContact2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_small"
android:gravity="center"
android:textColor="@color/briar_text_primary"
android:textSize="@dimen/text_size_tiny"
tools:text="Contact 2"/>
</LinearLayout>
</RelativeLayout>
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
tools:visibility="gone"/>
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/introductionText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_activity_horizontal"
android:textColor="@color/briar_text_secondary"
android:textSize="@dimen/text_size_medium"
tools:text="@string/introduction_message_text"/>
</LinearLayout>
</ScrollView>
<org.briarproject.android.view.LargeTextInputView
android:id="@+id/introductionMessageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:buttonText="@string/introduction_button"
app:hint="@string/introduction_message_hint"
app:maxLines="5"/>
</LinearLayout>

View File

@@ -18,7 +18,7 @@
android:layout_marginRight="@dimen/listitem_horizontal_margin"
android:layout_marginTop="@dimen/margin_medium"/>
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/nameView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -20,7 +20,7 @@
android:padding="@dimen/listitem_vertical_margin"
app:persona="commenter"/>
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/bodyView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -50,7 +50,7 @@
android:padding="@dimen/margin_small"
android:src="@drawable/ic_repeat"/>
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/bodyView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -59,7 +59,7 @@
android:layout_toRightOf="@+id/avatarFrameView"
android:orientation="vertical">
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/nameView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -17,7 +17,7 @@
android:layout_marginStart="@dimen/listitem_horizontal_margin"
tools:src="@drawable/ic_launcher"/>
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/nameView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -17,7 +17,7 @@
android:layout_centerVertical="true"
android:layout_marginRight="@dimen/listitem_horizontal_margin"/>
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/forumNameView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -63,7 +63,6 @@
android:visibility="gone"
/>
</RelativeLayout>
<RelativeLayout

View File

@@ -26,7 +26,7 @@
android:layout_marginRight="@dimen/message_bubble_margin_non_tail"
android:background="@drawable/notice_in_bottom">
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/introductionText"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -18,7 +18,7 @@
android:layout_marginRight="@dimen/listitem_horizontal_margin"
/>
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/forumNameView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -31,7 +31,7 @@
android:textSize="@dimen/text_size_medium"
tools:text="This is a name of a forum that is available"/>
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/sharedByView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -26,7 +26,7 @@
android:layout_marginRight="@dimen/message_bubble_margin_tail"
android:background="@drawable/notice_out_bottom">
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/introductionText"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -9,7 +9,7 @@
android:layout_marginLeft="@dimen/message_bubble_margin_tail"
android:layout_marginRight="@dimen/message_bubble_margin_non_tail">
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/noticeText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -14,7 +14,7 @@
android:layout_marginLeft="@dimen/message_bubble_margin_non_tail"
android:layout_marginRight="@dimen/message_bubble_margin_tail">
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/noticeText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -9,7 +9,7 @@
android:layout_marginTop="@dimen/listitem_horizontal_margin"
android:background="?attr/selectableItemBackground">
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/titleView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -41,7 +41,7 @@
android:textColor="@color/briar_text_secondary"
android:textSize="@dimen/text_size_small"/>
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/authorView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -100,7 +100,7 @@
android:textSize="@dimen/text_size_small"
tools:text="5 min. ago"/>
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/descriptionView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -34,7 +34,7 @@
android:layout_toRightOf="@+id/avatarView"
android:orientation="vertical">
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/nameView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -27,7 +27,7 @@
android:layout_marginRight="@dimen/message_bubble_margin_non_tail"
android:background="@drawable/notice_in_bottom">
<TextView
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/introductionText"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -10,41 +10,43 @@
style="@style/Divider.Horizontal"
android:layout_alignParentTop="true"/>
<org.thoughtcrime.securesms.components.emoji.EmojiToggle
android:id="@+id/emoji_toggle"
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_above="@+id/emoji_drawer"
android:layout_alignBottom="@+id/input_text"
android:layout_alignParentLeft="true"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/margin_small"
android:scaleType="center"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
android:id="@+id/input_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/btn_send"
android:layout_toRightOf="@+id/emoji_toggle"
android:inputType="textMultiLine|textCapSentences"
android:maxLines="5"
android:minHeight="42dp"/>
<org.thoughtcrime.securesms.components.emoji.EmojiToggle
android:id="@+id/emoji_toggle"
android:layout_width="@dimen/text_input_height"
android:layout_height="@dimen/text_input_height"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/margin_small"
android:scaleType="center"/>
<ImageButton
android:id="@+id/btn_send"
android:layout_width="wrap_content"
android:layout_height="42dp"
android:layout_above="@+id/emoji_drawer"
android:layout_alignBottom="@+id/input_text"
android:layout_alignParentRight="true"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:contentDescription="@string/send"
android:enabled="false"
android:padding="@dimen/margin_small"
android:src="@drawable/social_send_now_white"
android:tint="@color/briar_primary"/>
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
android:id="@+id/input_text"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@android:color/transparent"
android:inputType="textMultiLine|textCapSentences"
android:maxLines="5"
android:minHeight="@dimen/text_input_height"
android:textColor="@color/briar_text_primary"
android:textColorHint="@color/briar_text_tertiary"/>
<ImageButton
android:id="@+id/btn_send"
android:layout_width="@dimen/text_input_height"
android:layout_height="@dimen/text_input_height"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:contentDescription="@string/send"
android:enabled="false"
android:padding="@dimen/margin_small"
android:src="@drawable/social_send_now_white"
android:tint="@color/briar_primary"/>
</LinearLayout>
<org.thoughtcrime.securesms.components.emoji.EmojiDrawer
android:id="@+id/emoji_drawer"

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<merge
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:showIn="@layout/fragment_reblog">
<LinearLayout
android:id="@+id/input_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginLeft="@dimen/margin_medium"
android:layout_marginRight="@dimen/margin_medium"
android:layout_marginStart="@dimen/margin_medium"
android:layout_marginTop="@dimen/margin_medium"
android:background="@android:color/white"
android:elevation="@dimen/cardview_default_elevation"
android:minHeight="@dimen/text_input_height"
android:orientation="horizontal">
<org.thoughtcrime.securesms.components.emoji.EmojiToggle
android:id="@+id/emoji_toggle"
android:layout_width="@dimen/text_input_height"
android:layout_height="@dimen/text_input_height"
android:layout_gravity="bottom"
android:background="?attr/selectableItemBackground"
android:padding="@dimen/margin_small"
android:scaleType="center"/>
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
android:id="@+id/input_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:gravity="bottom"
android:inputType="textMultiLine|textLongMessage|textCapSentences|textAutoCorrect"
android:minHeight="@dimen/text_input_height"
android:paddingBottom="10dp"
android:paddingEnd="@dimen/margin_small"
android:paddingRight="@dimen/margin_small"
android:paddingTop="@dimen/margin_small"
android:textColor="@color/briar_text_primary"
android:textColorHint="@color/briar_text_tertiary"
tools:ignore="RtlSymmetry"/>
</LinearLayout>
<Button
android:id="@+id/btn_send"
style="@style/BriarButton"
android:layout_marginEnd="@dimen/margin_small"
android:layout_marginLeft="@dimen/margin_small"
android:layout_marginRight="@dimen/margin_small"
android:layout_marginStart="@dimen/margin_small"/>
<org.thoughtcrime.securesms.components.emoji.EmojiDrawer
android:id="@+id/emoji_drawer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"/>
</merge>