Merge "Hide Keyboard when the remote input view became invisible" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
89b98e9357
@@ -561,6 +561,11 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
|
|||||||
super.onVisibilityChanged(changedView, visibility);
|
super.onVisibilityChanged(changedView, visibility);
|
||||||
if (changedView == this && mOnVisibilityChangedListener != null) {
|
if (changedView == this && mOnVisibilityChangedListener != null) {
|
||||||
mOnVisibilityChangedListener.accept(visibility == VISIBLE);
|
mOnVisibilityChangedListener.accept(visibility == VISIBLE);
|
||||||
|
// Hide soft-keyboard when the input view became invisible
|
||||||
|
// (i.e. The notification shade collapsed by pressing the home key)
|
||||||
|
if (visibility != VISIBLE && !mEditText.isVisibleToUser()) {
|
||||||
|
mEditText.hideIme();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user