Merge "Fix inline reply clobbering when narrowly missing send button" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
75fe7d5d79
@@ -22,8 +22,7 @@
|
|||||||
android:theme="@style/systemui_theme_remote_input"
|
android:theme="@style/systemui_theme_remote_input"
|
||||||
android:id="@+id/remote_input"
|
android:id="@+id/remote_input"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent">
|
||||||
android:paddingEnd="12dp">
|
|
||||||
|
|
||||||
<view class="com.android.systemui.statusbar.policy.RemoteInputView$RemoteEditText"
|
<view class="com.android.systemui.statusbar.policy.RemoteInputView$RemoteEditText"
|
||||||
android:id="@+id/remote_input_text"
|
android:id="@+id/remote_input_text"
|
||||||
@@ -48,19 +47,17 @@
|
|||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical">
|
||||||
android:paddingTop="2dp"
|
|
||||||
android:paddingBottom="4dp">
|
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="24dp"
|
||||||
android:paddingTop="12dp"
|
android:paddingTop="16dp"
|
||||||
android:paddingBottom="12dp"
|
android:paddingBottom="16dp"
|
||||||
android:id="@+id/remote_input_send"
|
android:id="@+id/remote_input_send"
|
||||||
android:src="@drawable/ic_send"
|
android:src="@drawable/ic_send"
|
||||||
android:contentDescription="@*android:string/ime_action_send"
|
android:contentDescription="@*android:string/ime_action_send"
|
||||||
@@ -72,6 +69,7 @@
|
|||||||
android:id="@+id/remote_input_progress"
|
android:id="@+id/remote_input_progress"
|
||||||
android:layout_width="24dp"
|
android:layout_width="24dp"
|
||||||
android:layout_height="24dp"
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginEnd="6dp"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mEditText.setOnClickListener(this);
|
|
||||||
mEditText.addTextChangedListener(this);
|
mEditText.addTextChangedListener(this);
|
||||||
mEditText.setInnerFocusable(false);
|
mEditText.setInnerFocusable(false);
|
||||||
mEditText.mRemoteInputView = this;
|
mEditText.mRemoteInputView = this;
|
||||||
@@ -148,15 +147,19 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
if (v == mEditText) {
|
if (v == mSendButton) {
|
||||||
if (!mEditText.isFocusable()) {
|
|
||||||
focus();
|
|
||||||
}
|
|
||||||
} else if (v == mSendButton) {
|
|
||||||
sendRemoteInput();
|
sendRemoteInput();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onTouchEvent(MotionEvent event) {
|
||||||
|
super.onTouchEvent(event);
|
||||||
|
|
||||||
|
// We never want for a touch to escape to an outer view or one we covered.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public void onDefocus() {
|
public void onDefocus() {
|
||||||
mController.removeRemoteInput(mEntry);
|
mController.removeRemoteInput(mEntry);
|
||||||
mEntry.remoteInputText = mEditText.getText();
|
mEntry.remoteInputText = mEditText.getText();
|
||||||
|
|||||||
Reference in New Issue
Block a user