Simple Activity Scale Transitions on Android

By | December 19, 2016

Below simple code explains how you can do a simple activity transitions in Android


Intent intent = new Intent(this, SecondActivity.class);
viewGroup.addView(new Button(this));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
	ActivityOptions options = ActivityOptions.makeScaleUpAnimation(view, 0,
			0, view.getWidth(), view.getHeight());
	startActivity(intent, options.toBundle());
} else {
	startActivity(intent);
	
}

Leave a Reply

Your email address will not be published. Required fields are marked *