Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11404] Android: ProgressBar message property does not update in the GUI

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionWon't Fix
Resolution Date2012-10-25T18:45:53.000+0000
Affected Version/sRelease 2.1.3
Fix Version/s2012 Sprint 22 API, 2012 Sprint 22
ComponentsAndroid
Labelsapi, triage
ReporterBenjamin Hatfield
AssigneeHieu Pham
Created2012-10-12T00:22:52.000+0000
Updated2014-06-19T12:43:35.000+0000

Description

REPRODUCTION: Run code below in the Android emulator. Click on the window to increment the progress bar. RESULTS: Message in the progress bar does not change on the GUI even though the message property is being updated as demonstrated by the Label at the bottom.
var win = Ti.UI.createWindow({
	backgroundColor: 'white'
})

var pb=Titanium.UI.createProgressBar({
    top:10,
    width:250,
    height:'auto',
    min:0,
    max:10,
    value:0,
    color:'#fff',
    message:'Downloading 0 of 10',
    font:{fontSize:14, fontWeight:'bold'},
});

var label = Titanium.UI.createLabel({
	bottom: 10,
	text: pb.message
});

win.addEventListener('click', function(e){
	if (pb.value >= pb.max) return;
	pb.value++;
	pb.message = 'Downloading ' + pb.value + " of " + pb.max;
	Ti.API.info(pb.message);
	label.text = pb.message;
});

win.add(pb);
win.add(label);
win.open();
pb.show();

Comments

  1. Hieu Pham 2012-10-25

    This is only happening in 2.1.X. Works fine on master and on 3.0.X branch. Closing.

JSON Source