Skip to content

Commit

Permalink
update conversation input layout
Browse files Browse the repository at this point in the history
  • Loading branch information
imndx committed Oct 23, 2019
1 parent 9cce27b commit 5d19d7f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ void onExtImageViewClick() {
return;
}
if (rootLinearLayout.getCurrentInput() == extContainerFrameLayout) {
rootLinearLayout.showSoftkey(editText);
hideConversationExtension();
rootLinearLayout.showSoftkey(editText);
} else {
emotionImageView.setImageResource(R.mipmap.ic_cheat_emo);
showConversationExtension();
Expand All @@ -246,6 +246,7 @@ void onEmotionImageViewClick() {
}
if (rootLinearLayout.getCurrentInput() == emotionContainerFrameLayout) {
hideEmotionLayout();
rootLinearLayout.showSoftkey(editText);
} else {
hideAudioButton();
showEmotionLayout();
Expand Down
18 changes: 12 additions & 6 deletions chat/kit/src/main/res/layout/conversation_input_panel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,33 @@
<LinearLayout
android:id="@+id/inputContainerLinearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="center_vertical"
android:orientation="horizontal">

<ImageView
android:id="@+id/audioImageView"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="bottom"
android:layout_margin="5dp"
android:src="@mipmap/ic_cheat_voice" />

<RelativeLayout
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:gravity="center">

<EditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/shape_session_text_input"
android:maxLines="5"
android:minHeight="30dp"
android:paddingLeft="5dp"
android:textSize="16sp"
Expand All @@ -54,7 +54,7 @@
android:id="@+id/audioButton"
style="?android:attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="40dp"
android:background="@drawable/shape_session_btn_voice_normal"
android:gravity="center"
android:text="@string/please_to_talk"
Expand All @@ -68,14 +68,17 @@
android:id="@+id/emotionImageView"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="bottom"
android:layout_margin="5dp"
android:src="@mipmap/ic_cheat_emo" />

<ImageView
android:id="@+id/extImageView"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_gravity="bottom"
android:layout_marginRight="5dp"
android:layout_marginBottom="5dp"
android:scaleType="centerInside"
android:src="@mipmap/ic_cheat_add" />

Expand All @@ -84,8 +87,11 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="50dp"
android:layout_height="35dp"
android:layout_gravity="bottom"
android:layout_marginRight="5dp"
android:layout_marginBottom="2.5dp"
android:background="@drawable/shape_session_btn_send"
android:gravity="center"
android:text="@string/send"
android:textColor="@color/white"
android:textSize="13sp"
Expand Down

0 comments on commit 5d19d7f

Please sign in to comment.