Merge "Don't dismiss AutoCompleteTextView on focus change while temp detached" into lmp-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
24859ba016
@@ -1005,6 +1005,12 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
|||||||
@Override
|
@Override
|
||||||
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
|
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
|
||||||
super.onFocusChanged(focused, direction, previouslyFocusedRect);
|
super.onFocusChanged(focused, direction, previouslyFocusedRect);
|
||||||
|
|
||||||
|
if (mTemporaryDetach) {
|
||||||
|
// If we are temporarily in the detach state, then do nothing.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Perform validation if the view is losing focus.
|
// Perform validation if the view is losing focus.
|
||||||
if (!focused) {
|
if (!focused) {
|
||||||
performValidation();
|
performValidation();
|
||||||
|
|||||||
@@ -287,9 +287,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
|||||||
private int mCurTextColor;
|
private int mCurTextColor;
|
||||||
private int mCurHintTextColor;
|
private int mCurHintTextColor;
|
||||||
private boolean mFreezesText;
|
private boolean mFreezesText;
|
||||||
private boolean mTemporaryDetach;
|
|
||||||
private boolean mDispatchTemporaryDetach;
|
private boolean mDispatchTemporaryDetach;
|
||||||
|
|
||||||
|
/** Whether this view is temporarily detached from the parent view. */
|
||||||
|
boolean mTemporaryDetach;
|
||||||
|
|
||||||
private Editable.Factory mEditableFactory = Editable.Factory.getInstance();
|
private Editable.Factory mEditableFactory = Editable.Factory.getInstance();
|
||||||
private Spannable.Factory mSpannableFactory = Spannable.Factory.getInstance();
|
private Spannable.Factory mSpannableFactory = Spannable.Factory.getInstance();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user