Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11312] Android: ActivityIndicator: Activity indicator is not working.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-10-10T19:43:29.000+0000
Affected Version/sRelease 3.0.0
Fix Version/s2012 Sprint 21 API, 2012 Sprint 21
ComponentsAndroid
Labelsapi, module_activityindicator, qe-and100112, qe-testadded, regression
ReporterAnshu Mittal
AssigneePing Wang
Created2012-10-09T09:31:35.000+0000
Updated2013-03-13T18:56:41.000+0000

Description

Activity indicator is not working This is regression since the activity indicator works well on 2.1.3 GA. Steps to reproduce: 1. Create an app using the code below. 2. Launch the app and click the 'show indicator' button. Actual: Indicator is not shown. Expected: Activity indicator should be dispalyed.

var win1 = Titanium.UI.createWindow({  
    backgroundColor:'white',
    layout:'vertical'
});

var hideIndicatorTimeout = null;
 
		
	    win1.backgroundColor = "red";
	    win1.layout = 'vertical';
		 
		var indicator = Ti.UI.createActivityIndicator({
		  message: "Processing...",
		  cancelable: true  // Indicator will be cancelable by setting this to true.
		});
		indicator.addEventListener('cancel', function() {
		    // Fired when the user has canceled this indicator.
		    clearTimeout(hideIndicatorTimeout);
		    alert("Aborted processing");
		});
		 
		var cancelableSwitch = Titanium.UI.createSwitch({
		    title: 'Cancelable',
		    style: Ti.UI.Android.SWITCH_STYLE_CHECKBOX,
		    value: true
		});
		cancelableSwitch.addEventListener('change',function(e)
		{
		    indicator.cancelable = e.value;
		});
		win1.add(cancelableSwitch);
		 
		var showIndicatorButton = Ti.UI.createButton({
		    title: "Show Indicator"
		});
		showIndicatorButton.addEventListener('click', function() {
		    indicator.show();
		    hideIndicatorTimeout = setTimeout(function() {
		        indicator.hide();
		    }, 5000);
		});
		win1.add(showIndicatorButton);
		 
win1.open();

Comments

  1. Tamila Smolich 2012-10-09

  2. Ping Wang 2012-10-10

    The Android ActivityIndicator is totally new in 3.0.0 (see TIMOB-6092). It is a view, so it has to be added to the window/view before the show() method is called. The new ActivityIndicator does not have the property "cancelable" any more. Mark the ticket as invalid.
  3. Tamila Smolich 2012-10-18

    Closing the bug as invalid.

JSON Source