Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-11312

Android: ActivityIndicator: Activity indicator is not working.

    Details

      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();
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pwang Ping Wang
                Reporter:
                amittal Anshu Mittal
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-14576
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration