summaryrefslogtreecommitdiff
path: root/core/java/android/widget/AutoCompleteTextView.java
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2014-08-28 13:55:18 -0700
committerAlan Viverette <alanv@google.com>2014-08-28 13:55:18 -0700
commitf023c2530a4591889dda614aaa016d5a9f9617ed (patch)
tree5786ae0487a4bdb39bc57de1a26502f192cecba6 /core/java/android/widget/AutoCompleteTextView.java
parent719da6ba9b7f8b67c61479466919ecef0dd1cb79 (diff)
Update action bar item widths, overflow menu, button, and spinner styles
Manually modifies the overflow button hotspot bounds so that the ripple appears to be centered on the overflow icon. Adds styleable and parsing for list popup window offsets. Updates spinner text appearance to be consistent with drop down item text appearance. Also updates horizontal inner padding in buttons. BUG: 17305079 BUG: 17304391 BUG: 17302567 Change-Id: Iafddfef290078de968894a3b443ba9f60f84c6d4
Diffstat (limited to 'core/java/android/widget/AutoCompleteTextView.java')
-rw-r--r--core/java/android/widget/AutoCompleteTextView.java24
1 files changed, 8 insertions, 16 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index eb232fd8db5c..6f52db6c94b4 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -130,7 +130,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
}
public AutoCompleteTextView(Context context, AttributeSet attrs) {
- this(context, attrs, com.android.internal.R.attr.autoCompleteTextViewStyle);
+ this(context, attrs, R.attr.autoCompleteTextViewStyle);
}
public AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) {
@@ -141,23 +141,17 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
- mPopup = new ListPopupWindow(context, attrs,
- com.android.internal.R.attr.autoCompleteTextViewStyle);
+ mPopup = new ListPopupWindow(context, attrs, defStyleAttr, defStyleRes);
mPopup.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
mPopup.setPromptPosition(ListPopupWindow.POSITION_PROMPT_BELOW);
- final TypedArray a = context.obtainStyledAttributes(attrs,
- com.android.internal.R.styleable.AutoCompleteTextView, defStyleAttr, defStyleRes);
+ final TypedArray a = context.obtainStyledAttributes(
+ attrs, R.styleable.AutoCompleteTextView, defStyleAttr, defStyleRes);
- mThreshold = a.getInt(
- R.styleable.AutoCompleteTextView_completionThreshold, 2);
+ mThreshold = a.getInt(R.styleable.AutoCompleteTextView_completionThreshold, 2);
mPopup.setListSelector(a.getDrawable(R.styleable.AutoCompleteTextView_dropDownSelector));
- mPopup.setVerticalOffset((int)
- a.getDimension(R.styleable.AutoCompleteTextView_dropDownVerticalOffset, 0.0f));
- mPopup.setHorizontalOffset((int)
- a.getDimension(R.styleable.AutoCompleteTextView_dropDownHorizontalOffset, 0.0f));
-
+
// Get the anchor's id now, but the view won't be ready, so wait to actually get the
// view and store it in mDropDownAnchorView lazily in getDropDownAnchorView later.
// Defaults to NO_ID, in which case the getDropDownAnchorView method will simply return
@@ -167,11 +161,9 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
// For dropdown width, the developer can specify a specific width, or MATCH_PARENT
// (for full screen width) or WRAP_CONTENT (to match the width of the anchored view).
- mPopup.setWidth(a.getLayoutDimension(
- R.styleable.AutoCompleteTextView_dropDownWidth,
+ mPopup.setWidth(a.getLayoutDimension(R.styleable.AutoCompleteTextView_dropDownWidth,
ViewGroup.LayoutParams.WRAP_CONTENT));
- mPopup.setHeight(a.getLayoutDimension(
- R.styleable.AutoCompleteTextView_dropDownHeight,
+ mPopup.setHeight(a.getLayoutDimension(R.styleable.AutoCompleteTextView_dropDownHeight,
ViewGroup.LayoutParams.WRAP_CONTENT));
mHintResource = a.getResourceId(R.styleable.AutoCompleteTextView_completionHintView,