本文整理匯總了Java中com.nineoldandroids.animation.ObjectAnimator.setTarget方法的典型用法代碼示例。如果您正苦於以下問題:Java ObjectAnimator.setTarget方法的具體用法?Java ObjectAnimator.setTarget怎麽用?Java ObjectAnimator.setTarget使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.nineoldandroids.animation.ObjectAnimator
的用法示例。
在下文中一共展示了ObjectAnimator.setTarget方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onExpandAnimator
import com.nineoldandroids.animation.ObjectAnimator; //導入方法依賴的package包/類
public void onExpandAnimator(AnimatorSet animatorSet) {
int count = this.contentView.getChildCount();
for(int i = 0; i < count; ++i) {
View rootView = this.contentView.getChildAt(i);
ImageView iconIv = (ImageView)ABViewUtil.obtainView(rootView, com.wangjie.rapidfloatingactionbutton.R.id.rfab__content_label_list_icon_iv);
if(null == iconIv) {
return;
}
ObjectAnimator animator = new ObjectAnimator();
animator.setTarget(iconIv);
animator.setFloatValues(new float[]{45.0F, 0.0F});
animator.setPropertyName("rotation");
animator.setInterpolator(this.mOvershootInterpolator);
//animator.setStartDelay((long)(count * i * 20));
animatorSet.playTogether(new Animator[]{animator});
}
}
示例2: onCollapseAnimator
import com.nineoldandroids.animation.ObjectAnimator; //導入方法依賴的package包/類
public void onCollapseAnimator(AnimatorSet animatorSet) {
int count = this.contentView.getChildCount();
for(int i = 0; i < count; ++i) {
View rootView = this.contentView.getChildAt(i);
ImageView iconIv = (ImageView)ABViewUtil.obtainView(rootView, com.wangjie.rapidfloatingactionbutton.R.id.rfab__content_label_list_icon_iv);
if(null == iconIv) {
return;
}
ObjectAnimator animator = new ObjectAnimator();
animator.setTarget(iconIv);
animator.setFloatValues(new float[]{0.0F, 45.0F});
animator.setPropertyName("rotation");
animator.setInterpolator(this.mOvershootInterpolator);
//animator.setStartDelay((long)(count * i * 20));
animatorSet.playTogether(new Animator[]{animator});
}
}