Skip to content

Instantly share code, notes, and snippets.

View damanpreetsb's full-sized avatar
💪
Hustling

Damanpreet Singh damanpreetsb

💪
Hustling
View GitHub Profile
const element = <h1>JSX is cool</h1>;
ReactDOM.render(element, document.getElementById('root'));
.header {
padding: 20px;
background-color: #f1f1f1;
text-align: center;
font-size: 26px;
}
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('root')
);
ReactDOM.render(<AppComponent name="John Cena"/>, document.getElementById('app'));
class AppComponent extends React.Component {
render() {
return (
<div>
<h1>{this.props.name}</h1>
</div>
);
}
}
customiseButton.setOnClickListener {
val intent = Intent(this, CustomiseActivity::class.java)
val options = ActivityOptionsCompat
.makeSceneTransitionAnimation(
this,
pizzaImageView as View,
"pizza")
startActivity(intent, options.toBundle())
}
<item name="android:windowContentTransitions">true</item>
AnimatorSet().apply {
play(fadeCheese).with(fadeCrust).with(fadeInPizza).with(scaleUpPizzaX).with(scaleUpPizzaY).with(translatePizzaY)
}
val translatePizzaY = ObjectAnimator.ofFloat(pizzaImageView, "translationY", 0f, -360f)
val scaleUpPizzaY = ObjectAnimator.ofFloat(pizzaImageView, "scaleY", 0f, 14f)