我有一个在运行时创建的自定义ObjectAnimator对象。有没有类似于View的generateViewID()方法,它让我获取它的ID,所以我可以将它附加到FragmentTransaction?换句话说,我想做这样的事情:
// assuming I already have ObjectAnimator objects animator1 and animator2
// also already have a FragmentTransaction object named transaction.
int id1 = animator1.generateID();
int id2 = animator2.generateID();
transaction.setCustomAnimations(id1, id2);