diff options
Diffstat (limited to 'src/com/android/browser')
-rwxr-xr-x[-rw-r--r--] | src/com/android/browser/UrlInputView.java | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/src/com/android/browser/UrlInputView.java b/src/com/android/browser/UrlInputView.java index 02bba3c..b310ba1 100644..100755 --- a/src/com/android/browser/UrlInputView.java +++ b/src/com/android/browser/UrlInputView.java @@ -76,18 +76,9 @@ public class UrlInputView extends AutoCompleteTextView private int mState; private StateListener mStateListener; - private Rect mPopupPadding; public UrlInputView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); - TypedArray a = context.obtainStyledAttributes( - attrs, com.android.internal.R.styleable.PopupWindow, - R.attr.autoCompleteTextViewStyle, 0); - - Drawable popupbg = a.getDrawable(R.styleable.PopupWindow_popupBackground); - a.recycle(); - mPopupPadding = new Rect(); - popupbg.getPadding(mPopupPadding); init(context); } @@ -110,7 +101,7 @@ public class UrlInputView extends AutoCompleteTextView setOnItemClickListener(this); mNeedsUpdate = false; addTextChangedListener(this); - + setDropDownAnchor(com.android.browser.R.id.taburlbar); mState = StateListener.STATE_NORMAL; } @@ -201,36 +192,18 @@ public class UrlInputView extends AutoCompleteTextView Configuration.ORIENTATION_LANDSCAPE) != 0; mAdapter.setLandscapeMode(mLandscape); if (isPopupShowing() && (getVisibility() == View.VISIBLE)) { - setupDropDown(); + dismissDropDown(); + showDropDown(); performFiltering(getText(), 0); } } @Override - public void showDropDown() { - setupDropDown(); - super.showDropDown(); - } - - @Override public void dismissDropDown() { super.dismissDropDown(); mAdapter.clearCache(); } - private void setupDropDown() { - int width = mContainer != null ? mContainer.getWidth() : getWidth(); - width += mPopupPadding.left + mPopupPadding.right; - if (width != getDropDownWidth()) { - setDropDownWidth(width); - } - int left = getLeft(); - left += mPopupPadding.left; - if (left != -getDropDownHorizontalOffset()) { - setDropDownHorizontalOffset(-left); - } - } - @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { finishInput(getText().toString(), null, TYPED); |