Merge change 4940 into donut
* changes: Fixes #1933585. Don't dismiss ACTV's drop down when it's set to alwaysVisible.
This commit is contained in:
@ -18,7 +18,6 @@ package android.view;
|
||||
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.Rect;
|
||||
import android.os.IBinder;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
@ -805,6 +804,7 @@ public interface WindowManager extends ViewManager {
|
||||
screenOrientation = in.readInt();
|
||||
}
|
||||
|
||||
@SuppressWarnings({"PointlessBitwiseExpression"})
|
||||
public static final int LAYOUT_CHANGED = 1<<0;
|
||||
public static final int TYPE_CHANGED = 1<<1;
|
||||
public static final int FLAGS_CHANGED = 1<<2;
|
||||
|
@ -585,7 +585,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
||||
if (isPopupShowing()) {
|
||||
// special case for the back key, we do not even try to send it
|
||||
// to the drop down list but instead, consume it immediately
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK && !mDropDownAlwaysVisible) {
|
||||
dismissDropDown();
|
||||
return true;
|
||||
}
|
||||
@ -755,7 +755,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
||||
} else {
|
||||
// drop down is automatically dismissed when enough characters
|
||||
// are deleted from the text view
|
||||
dismissDropDown();
|
||||
if (!mDropDownAlwaysVisible) dismissDropDown();
|
||||
if (mFilter != null) {
|
||||
mFilter.filter(null);
|
||||
}
|
||||
@ -896,7 +896,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
||||
}
|
||||
}
|
||||
|
||||
if (mDropDownDismissedOnCompletion) {
|
||||
if (mDropDownDismissedOnCompletion && !mDropDownAlwaysVisible) {
|
||||
dismissDropDown();
|
||||
}
|
||||
}
|
||||
@ -977,7 +977,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
||||
if (hasFocus() && hasWindowFocus()) {
|
||||
showDropDown();
|
||||
}
|
||||
} else {
|
||||
} else if (!mDropDownAlwaysVisible) {
|
||||
dismissDropDown();
|
||||
}
|
||||
}
|
||||
@ -986,7 +986,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
||||
public void onWindowFocusChanged(boolean hasWindowFocus) {
|
||||
super.onWindowFocusChanged(hasWindowFocus);
|
||||
performValidation();
|
||||
if (!hasWindowFocus) {
|
||||
if (!hasWindowFocus && !mDropDownAlwaysVisible) {
|
||||
dismissDropDown();
|
||||
}
|
||||
}
|
||||
@ -995,7 +995,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
||||
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
|
||||
super.onFocusChanged(focused, direction, previouslyFocusedRect);
|
||||
performValidation();
|
||||
if (!focused) {
|
||||
if (!focused && !mDropDownAlwaysVisible) {
|
||||
dismissDropDown();
|
||||
}
|
||||
}
|
||||
|
@ -823,6 +823,7 @@ public class PopupWindow {
|
||||
p.flags = computeFlags(p.flags);
|
||||
p.type = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
|
||||
p.token = token;
|
||||
p.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
|
||||
p.setTitle("PopupWindow:" + Integer.toHexString(hashCode()));
|
||||
|
||||
return p;
|
||||
|
Reference in New Issue
Block a user