Skip to content

Instantly share code, notes, and snippets.

View damanpreetsb's full-sized avatar
💪
Hustling

Damanpreet Singh damanpreetsb

💪
Hustling
View GitHub Profile
val fadeCheese = ObjectAnimator.ofFloat(pizzaCheeseImageView, "alpha", 1f, 0f)
val fadeCrust = ObjectAnimator.ofFloat(pizzaCrustImageView, "alpha", 1f, 0f)
val fadeInPizza = ObjectAnimator.ofFloat(pizzaImageView, "alpha", 0f, 1f)
val scaleUpPizzaX = ObjectAnimator.ofFloat(pizzaImageView, "scaleX", 0f, 0.8f)
val scaleUpPizzaY = ObjectAnimator.ofFloat(pizzaImageView, "scaleY", 0f, 14f)
val translatePizzaY = ObjectAnimator.ofFloat(pizzaImageView, "translationY", 0f, -360f)
AnimatorSet().apply {
play(fadeCheese).with(fadeCrust).with(fadeInPizza).with(scaleUpPizzaX).with(scaleUpPizzaY).with(translatePizzaY)
}
<item name="android:windowContentTransitions">true</item>
customiseButton.setOnClickListener {
val intent = Intent(this, CustomiseActivity::class.java)
val options = ActivityOptionsCompat
.makeSceneTransitionAnimation(
this,
pizzaImageView as View,
"pizza")
startActivity(intent, options.toBundle())
}
class AppComponent extends React.Component {
render() {
return (
<div>
<h1>{this.props.name}</h1>
</div>
);
}
}