[TIMOB-9000] Android: Sliders must have min=0 and max=100
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-05-09T14:44:26.000+0000 |
| Affected Version/s | Release 2.0.1 |
| Fix Version/s | Release 2.1.0, Sprint 2012-10 API |
| Components | Android |
| Labels | api, module_slider, parity, qe-testadded |
| Reporter | Neeraj Gupta |
| Assignee | Vishal Duggal |
| Created | 2012-05-04T19:43:00.000+0000 |
| Updated | 2012-07-09T12:06:30.000+0000 |
Description
This issue has been reported by a user who spent hours in figuring out that sliders on Android must have min=0 and max=100. It is a parity issue with iOS platform. We need to have this intuitive and consistent across all platforms.
Test Code
var win = Ti.UI.createWindow({ backgroundColor:'white' }); var slider = Titanium.UI.createSlider({ top: 80, width: '80%' }); var label = Ti.UI.createLabel({ text: slider.value, width: Ti.UI.SIZE, height: Ti.UI.SIZE, top: 30, textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER }); slider.addEventListener('change', function(e) { label.text = e.value; }); win.add(label); win.add(slider); win.open();Pull pending https://github.com/appcelerator/titanium_mobile/pull/2150
The PR now sets defaults of min and max to 0 and 1 and Android now has support for fractional values.
Tested with Droid 3 2.3.4 with 2.1.0.v20120614102250