How to inflate view with some animation?
Android: how to animate viewstub?
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);
© 2022 - 2024 — McMap. All rights reserved.