[TIMOB-28425] Android: Change "plain" Ti.UI.Picker to use native spinners
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2021-05-26T15:33:15.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 10.0.1 |
| Components | Android |
| Labels | android, breaking-change, material-design, picker |
| Reporter | Joshua Quick |
| Assignee | Joshua Quick |
| Created | 2021-04-24T02:24:04.000+0000 |
| Updated | 2021-05-26T15:33:15.000+0000 |
Description
*Summary:*
When a
Ti.UI.Picker of type PICKER_TYPE_PLAIN is set up with "useSpinner" set to true, it uses a custom spinner which looks just like the old iOS spinner widget. It should use Android's native Java [NumberPicker](https://developer.android.com/reference/android/widget/NumberPicker) view which would support colors defined in theme, support dark/light theme switching, and correclty DPI scale.
*Test:*
Build and run [^SpinnerSimpleTest.js] on Android.
*Current Result:*
Displays a custom picker that looks like the old iOS spinner widget. Does not support colors defined by Android theme. Does not support dark/light theme.
!Spinner-Light-Old.png|thumbnail! !Spinner-Dark-Old.png|thumbnail!
*Expected Result:*
We should change it to use native Android spinners which appear as...
!Spinner-Light-New.png|thumbnail! !Spinner-Dark-New.png|thumbnail!
*Note:*
Once we replace it with the native NumberPicker Java view, we can remove the custom "kankan" spinner Java classes from our SDK here...
https://github.com/appcelerator/titanium_mobile/tree/master/android/modules/ui/src/java/kankan/wheel/widget
Attachments
| File | Date | Size |
|---|---|---|
| Spinner-Dark-New.png | 2021-04-24T02:19:37.000+0000 | 420506 |
| Spinner-Dark-Old.png | 2021-04-24T02:19:37.000+0000 | 439920 |
| Spinner-Light-New.png | 2021-04-24T02:19:37.000+0000 | 419997 |
| Spinner-Light-Old.png | 2021-04-24T02:19:37.000+0000 | 442611 |
| SpinnerSimpleTest.js | 2021-04-24T02:12:04.000+0000 | 935 |
PR (master): https://github.com/appcelerator/titanium_mobile/pull/12745
merged to master and 10_0_X for 10.0.1 target