Question

Hi i have a listview with multiple items on them, when you click on an item it opens a new activity. I want to change that activities animation, right now the listview onitemClickListener calls another class Onclick which implements onclicklistener:

listView.setOnItemClickListener(new OnListClick(
            myclass.class, this, listView, topics));

Does anyone know how i can change the default animation? thanks

Was it helpful?

Solution

Activities have a overridePendingTransition method, which can be used to change the animation when an activity starts.

After your startIntent call, call the overridePendingTransition, and pass it your custom enter and exit animation resources.

overridePendingTransition(int enterAnim, int exitAnim)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top