summaryrefslogtreecommitdiff
path: root/core/java/android/widget/Spinner.java
Commit message (Collapse)AuthorAgeFilesLines
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-291-2/+2
| | | | | | | | | | | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. This is a resubmit of ag/12929664 with some APIs excluded that caused test failures; see bugs 171886397, 171888296, 171864568. APIs excluded: Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord; Landroid/os/Process;->myPpid()I Landroid/os/SharedMemory;->getFd()I Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I Bug: 170729553 Test: Treehugger Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
* Revert "Add maxTargetSdk restriction to unused APIs."Hongwei Wang2020-10-281-2/+2
| | | | | | | | | This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397 Bug: 171886397 Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-271-2/+2
| | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-061-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I41e12e425284e74561c6b61663241df364ae54a1
* All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* Update core widgets to save attribute source info.Aurimas Liutikas2019-02-071-0/+2
| | | | | | Bug: 111439551 Test: make -j Change-Id: I72997a87122f38b32e38e42a690385acc7d0e521
* @InspectableProperty coverage for android.widgetAshley Rose2019-02-041-0/+7
| | | | | | | | | 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
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-211-0/+6
| | | | | | | | | | | | | | | | For packages: android.widget This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: Ic61019b1df85448a158fc2ba55c326353222c6b9
* Replaced auto-fill by autofill to keep it consistent with API style.Felipe Leme2017-03-091-22/+0
| | | | | | | | | | | | | | This change will affects 2 types of apps: autofill service implementations and apps that use autofill APIs. Since just the former is known to be used at the moment, we're not trying to keep backward compatibility with the latter. Bug: 35956626 Test: CtsAutoFillServiceTestCases pass Test: android.provider.SettingsBackupTest pass Change-Id: Ia720083508716deae9e887f9faa7ae7c5a82f471
* Optimize ViewStructure for autofill by removing irrelevant nodes.Felipe Leme2017-03-081-19/+0
| | | | | | | Test: CtsAutoFillServiceTestCases (with new tests) pass Fixes: 35840787 Change-Id: Iaa2c1907c8383b4a820fd7204e67fa2d276ad2b8
* Replace AutoFillType by view constants.Felipe Leme2017-03-071-3/+2
| | | | | | | | | | | | | | | Now that AutoFillType does have any logic (since the "subType" logic was moved to AutoFillHint), it makes more sense to get rid of the type and use constants directly. This change creates the contants and "pseudo-deprecate" the old stuff: it's still available because some clients are using it, but it will be removed once they migrate. Bug: 35956626 Test: CtsAutoFillServiceTestCases pass Change-Id: I0efe7f0cc101c86164a18c85903bb871e1f13ba2
* Don't set auto-fill options when Spinner has no adapter.Felipe Leme2017-03-041-0/+3
| | | | | | | Change-Id: Ib42fe5ba57d5ef31a00b39945ac3bcacbb217cc8 Fixes: 35965642 Bug: 33550221 Test: compilation only
* Added auto-fill support for Spinner.Felipe Leme2017-02-221-0/+40
| | | | | | | | | | | | | | Spinner is a special kind of list-value field because its auto-fillable values are not currently present in the assist structure: this change adds a getAutoFillOptions() to fill that void, and implements the auto-fill APIs on Spinner. It also fixes RadioGroup.getAutoFillValue() - it should return the index of the child, not its resource id. Bug: 33550221 Test: CtsAutoFillServiceTestCases (with new tests) pass Change-Id: I625e7dd705fade56fda490fcd3c4446c0c245ee1
* Fix import statements in android.widget package.Aurimas Liutikas2016-10-111-18/+18
| | | | | | | Additionally this CL removes spaces at the end of the line. Test: code still compiles. Change-Id: I1ce98b4e70aa3ae614f87966c3bc6181fa4389a4
* Custom pointer icon for standard widgetsVladislav Kaznacheev2016-09-231-0/+9
| | | | | | | | | | | | Implemented custom pointer icon for Button, ImageButton, Spinner and TabWidget. PointerIcon.TYPE_HAND will be shown if the widget is enabled, clickable and has not defined its own pointer icon through setPointerIcon or pointerIcon resource attribute. Bug: 31652293 Change-Id: I2a79786b12d15ea8223726d0949658801b046604
* Add @TestApi method to Spinner to test whether popup is showing.Kirill Grouchnikov2016-04-081-0/+9
| | | | Change-Id: I36e7f7c8ca6a69bdced3dd830e3ae0dde4181a4e
* Apply Spinner dropDownSelector value from XMLAlan Viverette2016-01-111-0/+4
| | | | | Bug: 26400523 Change-Id: I7e09d709214b6841b688cf130638583a9db01f19
* Pull out widget helpers into their own classes.Oren Blasberg2015-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in service of desktop-style submenus. Follow up CLs will make use of the newly independent classes. MOST of the changes in this CL are simply moving code from one place to another. Below are descriptions of the new files added: DropDownListView: Decouple this from ListPopupWindow, so other "menu popup" implementations [forthcoming] may make use of it. This class is UNCHANGED except for the addition of the setListSelectionHidden method. ForwardingListener: Decouple this from ListPopupWindow, so that other clients of this listener can expect a more general ShowableListMenu rather than a concrete ListPopupWindow. This will be useful later when we want to use something other than ListPopupWindow to show a menu. This class is UNCHANGED, except for (1) using the getListView() on popup rather than accessing its mDropDownList member, and (2) replacing ListPopupWindow return values with ShowableListMenu. MenuAdapter: Decouple from MenuPopupHelper so it may be used by forthcoming "menu popup" implementations rather than just by MenuPopupHelper itself. This class is UNCHANGED. ShowableListMenu: A new interface to encapsulate a menu that can be shown or hidden. This will be implemented by both ListPopupWindow and a forthcoming "menu popup" class. Bug: 20127825 Change-Id: I565b444d25e966ff8b8c6ceac7be8de56a9116df
* Clean up Spinner constructor docs, final class varsAlan Viverette2015-08-121-36/+44
| | | | Change-Id: I8c7eef08718474bbdebe8eceaf34ebac4007d945
* Ensure child is attached before performing measure/layout in SpinnerAlan Viverette2015-06-221-3/+5
| | | | | Bug: 21614663 Change-Id: Id84a720fac7050d312eb2eb6f12621217c4f8d0f
* Check targetSdkVersion when passing size hints for UNSPECIFIED specsAdam Powell2015-06-111-2/+2
| | | | | | | | | | | | | | As of MNC stock widgets will pass a size in UNSPECIFIED MeasureSpec values as a hint of the container size. This lets things like list items size themselves at 1/3 the size of their container. This breaks assumptions in a few existing applications, so maintain the old expectation of 0 size in UNSPECIFIED MeasureSpecs for apps targeting older SDK versions. Bug 20975083 Change-Id: Ic7318e88854e00d96852dde2c0e10376b42bf77f
* API review feedback for ThemedSpinnerAdapter, SpinnerAlan Viverette2015-06-021-27/+11
| | | | | | | | | | | | Moves themed interface out of Spinner and extends SpinnerAdapter, updates Spinner constructor to take a Theme rather than a Context. Does NOT change BaseAdapter to implement ThemedSpinnerAdapter, because the BaseAdapter class does not have any notion of layout inflation and that would break the contract implied by ThemedSpinnerAdapter. Bug: 21571899 Change-Id: Id7e8d630458857ce6c93a6a8b8f920e169ee1152
* Make UNSPECIFIED measure spec include size hint.Filip Gruszczynski2015-04-161-2/+2
| | | | Change-Id: I6c4f193d0590824c644e20e8af16d055a04ac9c9
* Remove unused imports in frameworks/base.John Spurlock2015-02-281-1/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* Add @ResourceInt annotations on APIsTor Norbye2015-02-181-2/+2
| | | | Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
* First quick implementation of auto assist data.Dianne Hackborn2015-02-061-5/+2
| | | | | | | | | | | | | | Introduce new AssistData class that contains all data the framework automatically generates for assist. Currently populated with a very simple tree structure representing the app's view hierarchy. Reworked how we populate the class name for accessibility info, so this is provided through a new method call on View that subclasses can override. This method is also used to populate the class name in AssistData. Change-Id: Ibd0acdc8354727d4291473283b5e4b70894905dc
* Ensure spinner variables are initialized correctlyAlan Viverette2015-01-161-67/+93
| | | | | | | | Removes the popup context setter, since this property cannot change after inflation without losing data from the AttributeSet. Bug: 19046761 Change-Id: I622f50d1752446a5b5793706c388e67a46ad06da
* Add popup theme for Spinner, use for actionBarPopupTheme defaultAlan Viverette2015-01-141-20/+96
| | | | | | | | Also adds methods for setting the context used to inflate drop-down views in several adapters. Bug: 17625714 Change-Id: Id267afa4901c1d46ceb3bc3b10fc642cea1799fe
* Fix accessibility delegationAlan Viverette2015-01-071-4/+6
| | | | | | | | | | | | | | | Ensures that delegate code is run last. Previously, calling the super method from an accessibility delegate set on a widget would only run code in the widget's parent. Next, the delegate code would run. Finally, the widget's code would run. As a result, the widget code would override any data supplied by the delegate. By moving all overridden code to internal methods, we ensure that the call chain for super includes the widget's parent code followed by the widget's code. The delegate code will always run last. BUG: 17641433 Change-Id: Ib9d403156c1fc4fb04f65f3c126d1277a44b3740
* Put in real "code" (aka marketing) name.Dianne Hackborn2014-10-071-2/+2
| | | | Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
* Fix docs buildAlan Viverette2014-08-281-6/+6
| | | | Change-Id: Id7b961ebcfffe536992208a157f625b5a1b1e1b6
* Update action bar item widths, overflow menu, button, and spinner stylesAlan Viverette2014-08-281-11/+0
| | | | | | | | | | | | | 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
* Throw exception when a bad adapter is passed to SpinnerAlan Viverette2014-06-171-1/+14
| | | | | BUG: 13570583 Change-Id: Ia38fa907bad7634f79d0da15b885905de23c9c46
* Add APIs for obtaining themed Drawable from Theme, ContextAlan Viverette2014-02-031-1/+1
| | | | | BUG: 12611005 Change-Id: Ic0057be4e4c2d0c61ce02a019b3f7d0625e3a016
* am 86824cf0: am 3a3def13: am 0e8f02d6: am 76dcacad: am 1ff4293e: Merge ↵Christopher Tate2014-01-271-2/+4
|\ | | | | | | | | | | | | "Fixed race condition in Spinner.DialogPopup on null reference." * commit '86824cf0a994abc38f08ac5692cf6b73cd10526e': Fixed race condition in Spinner.DialogPopup on null reference.
| * Merge "Fixed race condition in Spinner.DialogPopup on null reference."Christopher Tate2014-01-271-2/+4
| |\
| | * Fixed race condition in Spinner.DialogPopup on null reference.Daniel 2 Olofsson2013-07-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NullPointerException is triggered when DialogPopup is dismissed due to object mPopup being null when not showing. Race condition is triggered when dialog is dismissed before touch event to dismiss dialog has been processed properly. Fixed by adding a null check prior to accessing mPopup object. Change-Id: I3c4fe9c279d92a7103fb4f68189d1d42beedc606
* | | am 218b1163: am 6a221b3f: Fix some bizarre Spinner behaviorAdam Powell2013-09-101-10/+14
|\| | | | | | | | | | | | | | * commit '218b116344688053d3856a8ea8abc3dc241bcee1': Fix some bizarre Spinner behavior
| * | Fix some bizarre Spinner behaviorAdam Powell2013-09-101-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make sure the recycler is cleared when the adapter is changed. Bug 10689596 * Don't add views to measure the baseline. Bug 10690353 Change-Id: I841dc05652eef3319721631f96332f7900d1a631
* | | Add View constructor that supplies a default style resourceAlan Viverette2013-09-091-19/+43
|/ / | | | | | | | | | | | | Also updates the constructor of every class that extends View. BUG: 10676369 Change-Id: Ifaf27bf82028d180afa4931c0e906df88d858ac3
* | Merge "Update AccessibilityNodeInfo API as per API council request" into klp-devSvetoslav Ganov2013-08-271-1/+1
|\ \
| * | Update AccessibilityNodeInfo API as per API council requestSvetoslav Ganov2013-08-271-1/+1
| | | | | | | | | | | | | | | | | | bug:10461302 Change-Id: I9709a271ab3720e064b98c79c0950d811fe37b73
* | | Reconcile drag-to-open and touch event interceptionAlan Viverette2013-08-221-1/+1
|/ / | | | | | | | | | | | | | | Changes behavior such that dragging on a Spinner that's inside of a ScrollView will only scroll after a tap delay. BUG: 10442971 Change-Id: I9fa9c5f0cf99e0cd158f52b6fa7a109ce1b6b8b1
* | Merge "Move forwarding code to ListPopupWindow, add drag-to-open in Spinner" ↵Alan Viverette2013-08-211-2/+30
|\ \ | | | | | | | | | into klp-dev
| * | Move forwarding code to ListPopupWindow, add drag-to-open in SpinnerAlan Viverette2013-08-161-2/+30
| | | | | | | | | | | | | | | BUG: 9437139 Change-Id: I4599cf65a472b2ce74d2301988359d87917a6eec
* | | Use MULTI_LINE and OPENS_POPUP accessibility propertiesAlan Viverette2013-08-191-0/+4
|/ / | | | | | | | | BUG: 10391326 Change-Id: Ib2deeeef401802b6dde646e14ee5367141469a58
* | Don't show spinner popup if adapter is nullAlan Viverette2013-07-291-0/+3
| | | | | | | | | | BUG: 10076106 Change-Id: I1c1c235645b7963f802b0747f7ca64d8aedaaa66
* | Update setAdapter() documentation for SpinnerAlan Viverette2013-07-241-0/+12
| | | | | | | | | | BUG: 9906193 Change-Id: Id21ee957cb72c9452b150a713ed37adb0fa82d30
* | Permit null adapters in SpinnersAdam Powell2013-04-101-13/+16
| | | | | | | | | | | | Bug 8538144 Change-Id: I83f0ae78ce15f46827fb721cd0df1972b7d9d198
* | Make Spinner widget RTL-aware (part 2)Fabrice Di Meglio2013-03-051-12/+17
| | | | | | | | | | | | See bug #8159072 Spinner widget should be RTL'ized Change-Id: I3f9368f242a027852bf13a7ce4b760de1e1c2fb2