How to inflate view with some animation?
First call the inflate()
method, then setup an animation on the returned view, like this:
View view = ((ViewStub) findViewById(R.id.stub_view)).inflate();
Animation animation = AnimationUtils.makeInAnimation(this, true);
animation.setDuration(300);
view.startAnimation(animation);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With