Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28425] Android: Change "plain" Ti.UI.Picker to use native spinners

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2021-05-26T15:33:15.000+0000
Affected Version/sn/a
Fix Version/sRelease 10.0.1
ComponentsAndroid
Labelsandroid, breaking-change, material-design, picker
ReporterJoshua Quick
AssigneeJoshua Quick
Created2021-04-24T02:24:04.000+0000
Updated2021-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

FileDateSize
Spinner-Dark-New.png2021-04-24T02:19:37.000+0000420506
Spinner-Dark-Old.png2021-04-24T02:19:37.000+0000439920
Spinner-Light-New.png2021-04-24T02:19:37.000+0000419997
Spinner-Light-Old.png2021-04-24T02:19:37.000+0000442611
SpinnerSimpleTest.js2021-04-24T02:12:04.000+0000935

Comments

  1. Joshua Quick 2021-04-24

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/12745
  2. Christopher Williams 2021-05-26

    merged to master and 10_0_X for 10.0.1 target

JSON Source