Basically I want something like this (at the 30 second mark)
I want my items to slide in sequentially once the activity starts.
I tried Googling. I found nothing that I can understand. I'm still getting my way around this crazy world of developing apps for Android.
Thanks.
Add animation on recyclerView like this
recyclerView = (RecyclerView) findViewById(R.id.rv);
recyclerView.setHasFixedSize(true);
llm = new LinearLayoutManager(getApplicationContext());
recyclerView.setLayoutManager(llm);
AnimationSet set = new AnimationSet(true);
Animation animation = new AlphaAnimation(0.0f, 1.0f);
animation.setDuration(500);
set.addAnimation(animation);
animation = new TranslateAnimation(
Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f
);
animation.setDuration(100);
set.addAnimation(animation);
controller = new LayoutAnimationController(set, 0.5f);
adapter = new RecycleViewAdapter(poetNameSetGets, this);
recyclerView.setLayoutAnimation(controller);
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