I have a recyclerview which is a list of folders. When I click on an item, the folders/files inside that folder is the new list. I want to play animation of sliding out the old list and sliding in the new list. It should look like entering or leaving a directory.
I have implemented it like this:
// rv : RecyclerView
rv.startAnimation(AnimationUtils.loadAnimation(context, R.anim.slide_out_to_left))
adapter.list = list
rv.notifyDataSetChanged()
rv.startAnimation(AnimationUtils.loadAnimation(context, R.anim.slide_in_from_right))
But only the later animation is showing?