سؤال

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

هل كانت مفيدة؟

المحلول

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)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top