Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(android): make rotation animatable #13934

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Oct 14, 2023

Description

I only made rotationX and rotationY a first class animate() property in the old PR #13824.

This will add the normal rotate too

Changes

  • add rotation event to animate()
  • change check when to add addAnimator() to make it rotate in both directions

Example

const window = Ti.UI.createWindow();
const frontView = Ti.UI.createView({backgroundColor: 'blue',width: 200,height: 200,rotation: 0});

frontView.addEventListener('click', function() {
	frontView.animate({
		duration: 1000,
		rotation: 180,
	});
});

window.add(frontView);
window.open();

Test

  • start app
  • click square
simplescreenrecorder-2023-10-14_11.16.36.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant