[TIMOB-20441] Android: Implement TimePicker with `minuteInterval` property
| GitHub Issue | n/a |
| Type | Improvement |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2017-03-29T21:12:02.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 5.4.0 |
| Components | Android |
| Labels | n/a |
| Reporter | Ashraf Abu |
| Assignee | Ashraf Abu |
| Created | 2016-02-23T05:34:50.000+0000 |
| Updated | 2017-03-29T21:41:10.000+0000 |
Description
Android TimePicker should have the property minuteInterval.
For more information, refer to TIMOB-17998
Attachments
PR: https://github.com/appcelerator/titanium_mobile/pull/7898 This is also to solve the issue in TIMOB-17998
Verified the implementation of the
minuteIntervalproperty. With this property we get the minute native spinner (withnativeSpinnerset totrue) with the specified interval. Closing. Environment: Appc Studio : 4.6.0.201605201934 Ti SDK : 5.4.0.v20160608165242 Ti CLI : 5.0.8 Alloy : 1.8.7 MAC El Capitan : 10.11.4 Appc NPM : 4.2.7-2 Appc CLI : 5.4.0-11 Node: 4.4.4 Nexus 6 - Android 6.0.0This does not work with Ti SDK 6.0.3. No matter what you set the minuteInterval to it's always in 1 minute increments on Android. Please re-open.
Reopening to add screenshot.
[~btknorr], I am not able to reproduce the issue you are seeing. Sample code below was run on 6.0.3.GA:
Screenshot: !Screenshot_1490820489.png!var win = Ti.UI.createWindow({ backgroundColor : 'black', layout : 'vertical' }); var picker = Ti.UI.createPicker({ type:Ti.UI.PICKER_TYPE_TIME, nativeSpinner: true, format24: false, minuteInterval: 10, minDate:new Date(2009,0,1), maxDate:new Date(2014,11,31), value:new Date(2014,3,12) }); picker.addEventListener('change',function(e){ Ti.API.info("User selected date: " + e.value.toLocaleString()); }); var picker2 = Ti.UI.createPicker({ type:Ti.UI.PICKER_TYPE_TIME, nativeSpinner: true, format24: true, minuteInterval: 1, minDate:new Date(2009,0,1), maxDate:new Date(2014,11,31), value:new Date(2014,3,12) }); picker2.addEventListener('change',function(e){ Ti.API.info("User selected date: " + e.value.toLocaleString()); }); win.add(picker); win.add(picker2); win.open();Try the Samsung S7 Android OS 6.0.0 using Genymotion and you will see the issue.
Are you seriously going to make me create a new issue for this? Wow.
Reopening to attach Genymotion screenshot.
Tried Genymotion Samsung S7 Android 6.0.0, but no luck. Do you have any test case for me to check ? !Screen Shot 2017-03-29 at 2.04.25 PM.png!
We are calling showTimePickerDialog on the picker.
[http://imgr.es/3O8M]
Seems like I would need to open a new ticket for this though, correct?
Yeah this is a feature ticket. You can open another issue for what you are seeing with the appropriate test case, attachments & data if any. It would then go under the process of trying to reproduce on our side etc etc.