GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-14T14:49:50.000+0000 |
Affected Version/s | Release 2.1.2, Release 2.1.3, Release 3.0.0 |
Fix Version/s | Release 2.1.3, Release 3.0.0, Sprint 2012-20 API, 2012 Sprint 20 |
Components | Android |
Labels | SupportTeam, api, module_slider, qe-testadded |
Reporter | Daniel Sefton |
Assignee | Vishal Duggal |
Created | 2012-09-12T13:48:33.000+0000 |
Updated | 2012-10-26T22:23:55.000+0000 |
Problem description
Slider value is not being set on creation on OS 4.0+
Steps to Reproduce
Create a slider with a value property and build the app.
Result: Slider value is not set - it keeps the default value = 0
win = Titanium.UI.createWindow({
barColor : '#929292',
title : 'testing',
backgroundColor : '#FFFFFF',
backButtonTitle : 'back',
tabBarHidden : false,
top : 0
});
var ss = Ti.UI.createSlider({
top : 25,
value : 20,
min : 0,
max : 50,
left : 0,
right : 0
})
win.add(ss)
// Workaround #1
//win.addEventListener('open', function(e) {
//ss.value = 20;
//})
// Workaround #2
//setTimeout(function setSSvalue() {
//ss.value = 20;
//}, 200);
win.open();
Note: The slider shows the correct value if the value property is set after the slider has been created.
Pull pending https://github.com/appcelerator/titanium_mobile/pull/2936
Verified fix on: Titanium studio : 2.1.2.201208301612 SDK version : 2.1.3.v20120915120319 SDK version : 3.0.0.v20120917105713 Android 4.0+ (Galaxy S3)