diff options
author | wangqi <wangqi@google.com> | 2018-04-25 11:42:01 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-04-25 17:21:49 -0700 |
commit | 6d5a31b13b2624ebdeb5f5eccb327bc66544917d (patch) | |
tree | bb5b5de87c0c73f313258d1236025b7e5fefd13d /java | |
parent | 43ed0dc0666e9d2e2837a2019e2765f10f43dff8 (diff) |
UI tweak to RTT chat input box.
1. Hide input box when RTT call is not connected
2. Auto show keyboard when RTT call is connected
Bug: 70177426,76209308
Test: manual
PiperOrigin-RevId: 194273134
Change-Id: I36916560910e5bd47c291c8d3864db3948304db0
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/incallui/rtt/impl/RttChatFragment.java | 6 | ||||
-rw-r--r-- | java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/java/com/android/incallui/rtt/impl/RttChatFragment.java b/java/com/android/incallui/rtt/impl/RttChatFragment.java index 7bfa100ea..47036cd43 100644 --- a/java/com/android/incallui/rtt/impl/RttChatFragment.java +++ b/java/com/android/incallui/rtt/impl/RttChatFragment.java @@ -461,6 +461,12 @@ public class RttChatFragment extends Fragment + SystemClock.elapsedRealtime()); chronometer.start(); isTimerStarted = true; + editText.setVisibility(View.VISIBLE); + submitButton.setVisibility(View.VISIBLE); + editText.setFocusableInTouchMode(true); + if (editText.requestFocus()) { + UiUtil.openKeyboardFrom(getContext(), editText); + } } if (primaryCallState.state() == State.DIALING) { showWaitingForJoinBanner(); diff --git a/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml b/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml index ea7ff1095..f995185b1 100644 --- a/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml +++ b/java/com/android/incallui/rtt/impl/res/layout/frag_rtt_chat.xml @@ -54,7 +54,8 @@ android:minHeight="53dp" android:textColor="#DD000000" android:textColorHint="#757575" - android:textSize="16sp"/> + android:textSize="16sp" + android:visibility="gone"/> <ImageButton android:id="@+id/rtt_chat_submit_button" android:layout_width="55dp" @@ -65,7 +66,8 @@ android:backgroundTintMode="multiply" android:contentDescription="@string/content_description_rtt_check_button" android:src="@drawable/quantum_ic_done_vd_theme_24" - android:tint="@color/submit_button_color"/> + android:tint="@color/submit_button_color" + android:visibility="gone"/> </LinearLayout> <FrameLayout |