diff options
| author | Ashley Rose <ashleyrose@google.com> | 2019-01-28 19:29:36 -0500 |
|---|---|---|
| committer | Ashley Rose <ashleyrose@google.com> | 2019-02-04 19:11:56 -0500 |
| commit | 55f9f92545209eddff13e120734e5e3b8190402a (patch) | |
| tree | 008771adad83260ce043695e5966cfdab233a19d /core/java/android/widget/AutoCompleteTextView.java | |
| parent | 6296773cd05e1922b8c943ffe40099b53b9ef72b (diff) | |
@InspectableProperty coverage for android.widget
A few getters for view properties have been added where they were
missing. CTS tests for the new APIs are pending in b/123894719.
Test: m framework
Bug: 120492712
Change-Id: I743ce693d384eaf749ced3db7f81bda7d19ed275
Diffstat (limited to 'core/java/android/widget/AutoCompleteTextView.java')
| -rw-r--r-- | core/java/android/widget/AutoCompleteTextView.java | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index 7d6564fd91fb..9bc055e7111b 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -35,12 +35,12 @@ import android.view.ContextThemeWrapper; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; -import android.view.ViewGroup; import android.view.ViewGroup.LayoutParams; import android.view.WindowManager; import android.view.inputmethod.CompletionInfo; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodManager; +import android.view.inspector.InspectableProperty; import com.android.internal.R; @@ -362,27 +362,33 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe * * @attr ref android.R.styleable#AutoCompleteTextView_completionHint */ + @InspectableProperty public CharSequence getCompletionHint() { return mHintText; } /** - * <p>Returns the current width for the auto-complete drop down list. This can - * be a fixed width, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill the screen, or - * {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the width of its anchor view.</p> + * Returns the current width for the auto-complete drop down list. + * + * This can be a fixed width, or {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT} + * to fill the screen, or {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT} + * to fit the width of its anchor view. * * @return the width for the drop down list * * @attr ref android.R.styleable#AutoCompleteTextView_dropDownWidth */ + @InspectableProperty public int getDropDownWidth() { return mPopup.getWidth(); } /** - * <p>Sets the current width for the auto-complete drop down list. This can - * be a fixed width, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill the screen, or - * {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the width of its anchor view.</p> + * Sets the current width for the auto-complete drop down list. + * + * This can be a fixed width, or {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT} + * to fill the screen, or {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT} + * to fit the width of its anchor view. * * @param width the width to use * @@ -393,24 +399,27 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe } /** - * <p>Returns the current height for the auto-complete drop down list. This can - * be a fixed height, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill - * the screen, or {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the height - * of the drop down's content.</p> + * <p>Returns the current height for the auto-complete drop down list. + * + * This can be a fixed width, or {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT} + * to fill the screen, or {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT} + * to fit the width of its anchor view. * * @return the height for the drop down list * * @attr ref android.R.styleable#AutoCompleteTextView_dropDownHeight */ + @InspectableProperty public int getDropDownHeight() { return mPopup.getHeight(); } /** - * <p>Sets the current height for the auto-complete drop down list. This can - * be a fixed height, or {@link ViewGroup.LayoutParams#MATCH_PARENT} to fill - * the screen, or {@link ViewGroup.LayoutParams#WRAP_CONTENT} to fit the height - * of the drop down's content.</p> + * Sets the current height for the auto-complete drop down list. + * + * This can be a fixed width, or {@link android.view.ViewGroup.LayoutParams#MATCH_PARENT} + * to fill the screen, or {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT} + * to fit the width of its anchor view. * * @param height the height to use * @@ -452,6 +461,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe * * @attr ref android.R.styleable#PopupWindow_popupBackground */ + @InspectableProperty(name = "popupBackground") public Drawable getDropDownBackground() { return mPopup.getBackground(); } @@ -496,6 +506,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe * * @attr ref android.R.styleable#ListPopupWindow_dropDownVerticalOffset */ + @InspectableProperty public int getDropDownVerticalOffset() { return mPopup.getVerticalOffset(); } @@ -518,6 +529,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe * * @attr ref android.R.styleable#ListPopupWindow_dropDownHorizontalOffset */ + @InspectableProperty public int getDropDownHorizontalOffset() { return mPopup.getHorizontalOffset(); } @@ -610,6 +622,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe * * @attr ref android.R.styleable#AutoCompleteTextView_completionThreshold */ + @InspectableProperty(name = "completionThreshold") public int getThreshold() { return mThreshold; } |
