Skip to content

Commit 5e3c3af

Browse files
committed
Implemented multiline message field like in Telegram (#20)
1 parent e210145 commit 5e3c3af

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/src/main/res/layout/activity_chat.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<LinearLayout
3838
android:id="@+id/linearLayout"
3939
android:layout_width="0dp"
40-
android:layout_height="48dp"
40+
android:layout_height="wrap_content"
4141
android:background="@android:color/white"
4242
android:orientation="horizontal"
4343
app:layout_constraintBottom_toBottomOf="parent"
@@ -54,7 +54,8 @@
5454
android:background="@null"
5555
android:ems="10"
5656
android:hint="@string/chat__message_hint"
57-
android:inputType="textShortMessage|textCapSentences"
57+
android:inputType="textLongMessage|textCapSentences|textMultiLine"
58+
android:maxLines="4"
5859
android:padding="8dp"
5960
android:textSize="16sp" />
6061

@@ -65,9 +66,9 @@
6566
android:layout_gravity="center_vertical"
6667
android:layout_weight="0"
6768
android:background="?android:attr/selectableItemBackground"
69+
android:contentDescription="@string/chat__cd__send_button"
6870
android:tint="@color/colorAccent"
69-
app:srcCompat="@drawable/ic_send_black_24dp"
70-
android:contentDescription="@string/chat__cd__send_button"/>
71+
app:srcCompat="@drawable/ic_send_black_24dp" />
7172

7273
</LinearLayout>
7374

0 commit comments

Comments
 (0)