summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-22 11:17:13 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-06-22 11:17:13 -0700
commitecfb9f91afa49df7b9b62526dcaca431b5ff1e01 (patch)
tree070c626e6d9225b12bd9987bad364762cd3ab9c3
parent07a5f126df2cf0dbeb7096535ae634ea8eaeb306 (diff)
parent7299807d1895ea25cbe45d32b6edfd9a5723ee7a (diff)
downloadframeworks_base-ecfb9f91afa49df7b9b62526dcaca431b5ff1e01.zip
frameworks_base-ecfb9f91afa49df7b9b62526dcaca431b5ff1e01.tar.gz
frameworks_base-ecfb9f91afa49df7b9b62526dcaca431b5ff1e01.tar.bz2
Merge change 4940 into donut
* changes: Fixes #1933585. Don't dismiss ACTV's drop down when it's set to alwaysVisible.
-rw-r--r--core/java/android/view/WindowManager.java2
-rw-r--r--core/java/android/widget/AutoCompleteTextView.java12
-rw-r--r--core/java/android/widget/PopupWindow.java1
3 files changed, 8 insertions, 7 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index e1c4687..e295d15 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -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;
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index 8f1b0ee..5dd3ec4 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -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();
}
}
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index 68764a5..b188c31 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -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;