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

Android: add support for activityEnterAnimation and activityExitAnimation for Window.close method

    Details

      Description

      Problem
      The ability to animate enter and exit activities on opening windows is working fine, but this is only useful when you need to progress forward in an apps UI. If one wants to close windows and go backwards (hit the back button) they cannot use the animations which only work on win.open() and not on win.close(). The pull request below allows the ability to use the activityAnimations when closing a window.

      test case for the pull request

       
      var win = Ti.UI.createWindow({
      	backgroundColor:'white'
      });
       
      var button = Ti.UI.createButton({title:'open'});
      button.addEventListener('click', function (){
      	var win = Ti.UI.createWindow({
      		backgroundColor:'blue',
      		modal:false
      	});
      	win.addEventListener('android:back', function(){
      		win.close({
      		    activityExitAnimation: Ti.Android.R.anim.slide_out_right
      		});
      	})
      	win.open({
      	    activityEnterAnimation: Ti.Android.R.anim.fade_in,
      	})
      	
      })
      win.add(button);
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bijuexalture Biju pm
                Reporter:
                clathrop Carter Lathrop
                Reviewer:
                Allen Yeung
              • Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration