Java Code Examples for com.nineoldandroids.animation.ObjectAnimator#setFloatValues()

The following examples show how to use com.nineoldandroids.animation.ObjectAnimator#setFloatValues() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MyRapidFloatingActionContentLabelList.java    From nono-android with GNU General Public License v3.0 6 votes vote down vote up
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});
    }

}
 
Example 2
Source File: MyRapidFloatingActionContentLabelList.java    From nono-android with GNU General Public License v3.0 6 votes vote down vote up
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});
    }

}