From e28bb930453c6852dc03210bd95094bfaebb6108 Mon Sep 17 00:00:00 2001 From: Ilham Firdausi Putra <ilhamfputra31@gmail.com> Date: Sat, 23 Feb 2019 17:14:27 +0700 Subject: [PATCH] fix bot edit text layout multiple lines problem --- .../app/src/main/res/layout/fragment_bot.xml | 56 ++++++++++--------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/android/app/src/main/res/layout/fragment_bot.xml b/android/app/src/main/res/layout/fragment_bot.xml index a9d3cdb..5fbb2b7 100644 --- a/android/app/src/main/res/layout/fragment_bot.xml +++ b/android/app/src/main/res/layout/fragment_bot.xml @@ -9,7 +9,7 @@ <android.support.v7.widget.RecyclerView android:id="@+id/chat_bot_room_rv" android:layout_width="match_parent" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:layout_marginBottom="56dp" app:layout_constraintTop_toTopOf="parent" app:layout_constraintLeft_toLeftOf="parent" @@ -17,13 +17,18 @@ </android.support.v7.widget.RecyclerView> - <LinearLayout + <android.support.constraint.ConstraintLayout android:layout_width="match_parent" - android:layout_height="56dp" - app:layout_constraintTop_toBottomOf="@id/chat_bot_room_rv" + android:layout_height="wrap_content" + android:minHeight="56dp" + app:layout_constraintBottom_toBottomOf="parent" android:orientation="horizontal"> <EditText + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintRight_toLeftOf="@id/chat_bot_room_send" android:id="@+id/chat_bot_room_et" android:layout_width="0dip" android:layout_height="wrap_content" @@ -36,28 +41,25 @@ android:maxLength ="2000" android:scrollHorizontally="false"/> - <LinearLayout - android:layout_width="0dp" - android:layout_height="match_parent" - android:layout_weight="2"> - - <ImageButton - android:id="@+id/chat_bot_room_send" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:scaleType="fitCenter" - android:clickable="true" - android:focusable="true" - android:background="@drawable/my_custom_selector" - android:contentDescription="@string/send_message_button" - android:layout_marginStart="15dp" - android:layout_marginEnd="15dp" - android:layout_marginTop="10dp" - android:layout_marginBottom="10dp"/> - - </LinearLayout> - - - </LinearLayout> + + <ImageButton + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintRight_toRightOf="parent" + android:id="@+id/chat_bot_room_send" + android:layout_width="36dp" + android:layout_height="36dp" + android:scaleType="fitCenter" + android:clickable="true" + android:focusable="true" + android:background="@drawable/my_custom_selector" + android:contentDescription="@string/send_message_button" + android:layout_marginBottom="10dp" + android:layout_marginRight="10dp" + /> + + + + + </android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout> \ No newline at end of file -- GitLab