I want to implement some small task or call invalidateOptionsMenu();
whenever the animation done by mCardScrollView.animate(position, Animation.INSERTION);
is completed. So i was wondering is there a way to implement this.
Do i have to write my own animation callback for this?
You can use withEndAction
method to perform something you want to when animation is completed successfully.
Runnable endAction = new Runnable() {
public void run() {
//do something
}
};
mCardScrollView.animate(position, Animation.INSERTION).withEndAction(endAction);
Hope this helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.