Merge "Fix inline reply clobbering when narrowly missing send button" into nyc-dev

am: 75fe7d5

* commit '75fe7d5d791d8372af9d2e11a50287e6119a9780':
  Fix inline reply clobbering when narrowly missing send button

Change-Id: I61f9303383937030750edd95eee11862b59e8447
This commit is contained in:
Adrian Roos
2016-04-20 23:44:54 +00:00
committed by android-build-merger
2 changed files with 16 additions and 15 deletions

View File

@@ -22,8 +22,7 @@
android:theme="@style/systemui_theme_remote_input"
android:id="@+id/remote_input"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:paddingEnd="12dp">
android:layout_width="match_parent">
<view class="com.android.systemui.statusbar.policy.RemoteInputView$RemoteEditText"
android:id="@+id/remote_input_text"
@@ -48,19 +47,17 @@
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingTop="2dp"
android:paddingBottom="4dp">
android:layout_height="match_parent"
android:layout_gravity="center_vertical">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingStart="12dp"
android:paddingEnd="12dp"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingEnd="24dp"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:id="@+id/remote_input_send"
android:src="@drawable/ic_send"
android:contentDescription="@*android:string/ime_action_send"
@@ -72,6 +69,7 @@
android:id="@+id/remote_input_progress"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="6dp"
android:layout_gravity="center"
android:visibility="invisible"
android:indeterminate="true"

View File

@@ -105,7 +105,6 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
return false;
}
});
mEditText.setOnClickListener(this);
mEditText.addTextChangedListener(this);
mEditText.setInnerFocusable(false);
mEditText.mRemoteInputView = this;
@@ -148,15 +147,19 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
@Override
public void onClick(View v) {
if (v == mEditText) {
if (!mEditText.isFocusable()) {
focus();
}
} else if (v == mSendButton) {
if (v == mSendButton) {
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() {
mController.removeRemoteInput(mEntry);
mEntry.remoteInputText = mEditText.getText();