[TIMOB-13942] Android: Slider ignores values when min/max are floats
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2015-01-29T23:26:02.000+0000 |
Affected Version/s | Release 3.4.1, Release 3.5.0 |
Fix Version/s | Release 4.1.0 |
Components | Android |
Labels | android, slider |
Reporter | Jeremiah Albrant |
Assignee | Hieu Pham |
Created | 2013-05-21T03:42:27.000+0000 |
Updated | 2015-06-09T23:50:40.000+0000 |
Description
*Problem*
The example below works in the browsers but will not let the user change the value from 0 on Android.
*Test case*
var win = Ti.UI.createWindow({backgroundColor:"#FFF"});
var slider = Titanium.UI.createSlider({
top : 50,
min : 0.9,
max : 1.1,
width : '100%',
value : 1
});
win.add(slider);
var label = Ti.UI.createLabel({
text : slider.value,
width : '100%',
height : 'auto',
top : 30,
left : 0,
textAlign : Ti.UI.TEXT_ALIGNMENT_CENTER
});
win.add(label);
slider.addEventListener('change', function(e) {
label.text = String.format("%3.1f", e.value);
});
win.open();
Tested and confirmed on Android 4.1.2 x86 emulator with Ti SDK 3.1 GA and 3.2 CI.
Android doesn't ignore these values, it simply round them to integers before proceed. Android doesn't support float values for min,max, minrange, and maxrange. Please refer to the documentation: http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.ProgressBar-property-min
Closing as this is resolved as "won't fix".