summaryrefslogtreecommitdiff
path: root/core/java/android/widget/AutoCompleteTextView.java
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2013-09-09 18:09:13 -0700
committerAlan Viverette <alanv@google.com>2013-09-09 18:09:13 -0700
commit617feb99a06e7ffb3894e86a286bf30e085f321a (patch)
tree81366597a0234fc7634effbf7cf9d13e2c5c69e2 /core/java/android/widget/AutoCompleteTextView.java
parente668c0a1759d35ce3156bcd830ed07d3fddd2ce4 (diff)
Add View constructor that supplies a default style resource
Also updates the constructor of every class that extends View. BUG: 10676369 Change-Id: Ifaf27bf82028d180afa4931c0e906df88d858ac3
Diffstat (limited to 'core/java/android/widget/AutoCompleteTextView.java')
-rw-r--r--core/java/android/widget/AutoCompleteTextView.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java
index f0eb94fcb106..259c66b9de37 100644
--- a/core/java/android/widget/AutoCompleteTextView.java
+++ b/core/java/android/widget/AutoCompleteTextView.java
@@ -133,17 +133,21 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
this(context, attrs, com.android.internal.R.attr.autoCompleteTextViewStyle);
}
- public AutoCompleteTextView(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
+ public AutoCompleteTextView(Context context, AttributeSet attrs, int defStyleAttr) {
+ this(context, attrs, defStyleAttr, 0);
+ }
+
+ public AutoCompleteTextView(
+ 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.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
mPopup.setPromptPosition(ListPopupWindow.POSITION_PROMPT_BELOW);
- TypedArray a =
- context.obtainStyledAttributes(
- attrs, com.android.internal.R.styleable.AutoCompleteTextView, defStyle, 0);
+ final TypedArray a = context.obtainStyledAttributes(attrs,
+ com.android.internal.R.styleable.AutoCompleteTextView, defStyleAttr, defStyleRes);
mThreshold = a.getInt(
R.styleable.AutoCompleteTextView_completionThreshold, 2);