当前位置: 首页>>代码示例>>Java>>正文


Java ObjectAnimator.setInterpolator方法代码示例

本文整理汇总了Java中com.nineoldandroids.animation.ObjectAnimator.setInterpolator方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectAnimator.setInterpolator方法的具体用法?Java ObjectAnimator.setInterpolator怎么用?Java ObjectAnimator.setInterpolator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.nineoldandroids.animation.ObjectAnimator的用法示例。


在下文中一共展示了ObjectAnimator.setInterpolator方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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});
    }

}
 
开发者ID:tianyuan168326,项目名称:nono-android,代码行数:21,代码来源:MyRapidFloatingActionContentLabelList.java

示例2: 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});
    }

}
 
开发者ID:tianyuan168326,项目名称:nono-android,代码行数:21,代码来源:MyRapidFloatingActionContentLabelList.java

示例3: show

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
public void show(){
	ObjectAnimator animator = ObjectAnimator.ofFloat(ButtonFloat.this, "y", showPosition);
	animator.setInterpolator(new BounceInterpolator());
	animator.setDuration(1500);
	animator.start();
	isShow = true;
}
 
开发者ID:shegang,项目名称:meishiDemo,代码行数:8,代码来源:ButtonFloat.java

示例4: hide

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
public void hide(){
	
	ObjectAnimator animator = ObjectAnimator.ofFloat(ButtonFloat.this, "y", hidePosition);
	animator.setInterpolator(new BounceInterpolator());
	animator.setDuration(1500);
	animator.start();
	
	isShow = false;
}
 
开发者ID:shegang,项目名称:meishiDemo,代码行数:10,代码来源:ButtonFloat.java

示例5: animation

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
private void animation(MenuVH menuVH) {

        ViewHelper.setAlpha(menuVH.itemView, 0);

        ViewHelper.setTranslationY(menuVH.itemView, 300);
        ObjectAnimator translationY = ObjectAnimator.ofFloat(menuVH.itemView, "translationY", 500, 0);
        translationY.setDuration(300);
        translationY.setInterpolator(new OvershootInterpolator(1.6f));
        ObjectAnimator alphaIn = ObjectAnimator.ofFloat(menuVH.itemView, "alpha", 0, 1);
        alphaIn.setDuration(100);
        AnimatorSet animatorSet = new AnimatorSet();
        animatorSet.playTogether(translationY, alphaIn);
        animatorSet.setStartDelay(30 * menuVH.getAdapterPosition());
        animatorSet.start();
    }
 
开发者ID:xiangyunwan,项目名称:AndroidSweetSheet-master,代码行数:16,代码来源:MenuRVAdapter.java

示例6: onSelectChanged

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
public void onSelectChanged(View v, boolean selected) {
    int end = selected ? 360 : 0;
    ObjectAnimator rotateAnimator = ObjectAnimator.ofFloat(v, "rotation",  end);
    rotateAnimator.setDuration(400);
    rotateAnimator.setInterpolator(new AnticipateInterpolator());
    rotateAnimator.start();
}
 
开发者ID:peng8350,项目名称:JPTabBar,代码行数:9,代码来源:RotateAnimater.java

示例7: onSelectChanged

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
public void onSelectChanged(View v, boolean selected) {
    int end = selected?-10:0;
    ObjectAnimator jumpAnimator = ObjectAnimator.ofFloat(v,"translationY",end);
    jumpAnimator.setDuration(300);
    jumpAnimator.setInterpolator(new AnticipateInterpolator());
    jumpAnimator.start();
}
 
开发者ID:peng8350,项目名称:JPTabBar,代码行数:9,代码来源:JumpAnimater.java

示例8: onSelectChanged

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
public void onSelectChanged(View v,boolean selected) {
    float end = selected?180f:0f;
    ObjectAnimator flipAnimator = ObjectAnimator.ofFloat(v,"rotationY",end);
    flipAnimator.setDuration(400);
    flipAnimator.setInterpolator(new DecelerateInterpolator());
    flipAnimator.start();
}
 
开发者ID:peng8350,项目名称:JPTabBar,代码行数:9,代码来源:FlipAnimater.java

示例9: startRotation

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
public static void startRotation(View view, float toRotation, long duration, long startDelay, int times) {
    ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "rotation", ViewHelper.getRotation(view), toRotation).setDuration(duration);
    objectAnimator.setStartDelay(startDelay);
    objectAnimator.setRepeatCount(times);
    objectAnimator.setInterpolator(new LinearInterpolator());
    objectAnimator.start();
}
 
开发者ID:arieshao,项目名称:Integration,代码行数:8,代码来源:AnimUtil.java

示例10: startScale

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
public static void startScale(final View view, float toScale, long duration, long startDelay, Interpolator setInterpolator) {
    ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "scaleX", ViewHelper.getScaleX(view), toScale).setDuration(duration);
    objectAnimator.setStartDelay(startDelay);
    objectAnimator.setInterpolator(setInterpolator);
    objectAnimator.start();
    objectAnimator = ObjectAnimator.ofFloat(view, "scaleY", ViewHelper.getScaleY(view), toScale).setDuration(duration);
    objectAnimator.setStartDelay(startDelay);
    objectAnimator.setInterpolator(setInterpolator);
    objectAnimator.start();
}
 
开发者ID:arieshao,项目名称:Integration,代码行数:11,代码来源:AnimUtil.java

示例11: createAnimation

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    List<Animator> animators=new ArrayList<>();
    PropertyValuesHolder rotation5=PropertyValuesHolder.ofFloat("rotationX",0,180,180,0,0);
    PropertyValuesHolder rotation6=PropertyValuesHolder.ofFloat("rotationY",0,0,180,180,0);
    ObjectAnimator animator=ObjectAnimator.ofPropertyValuesHolder(getTarget(), rotation6,rotation5);
    animator.setInterpolator(new LinearInterpolator());
    animator.setRepeatCount(-1);
    animator.setDuration(2500);
    animator.start();
    animators.add(animator);
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:14,代码来源:SquareSpinIndicator.java

示例12: createAnimation

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
public List<Animator> createAnimation() {
    PropertyValuesHolder rotation6=PropertyValuesHolder.ofFloat("rotationX",0,360);
    ObjectAnimator animator=ObjectAnimator.ofPropertyValuesHolder(getTarget(), rotation6);
    animator.setInterpolator(new LinearInterpolator());
    animator.setRepeatCount(-1);
    animator.setDuration(1500);
    animator.start();
    List<Animator> animators=new ArrayList<>();
    animators.add(animator);
    return animators;
}
 
开发者ID:cowthan,项目名称:AyoSunny,代码行数:13,代码来源:BallPulseRiseIndicator.java

示例13: toggleNoTextInput

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
protected void toggleNoTextInput(InputType type) {
    mPanelLayout.setVisibility(View.VISIBLE);
    if (type != null && type != InputType.Text) {
        View dropView = getCurrentNoTextInput();
        mInputType = type;
        View popUpView = null;
        switch (type) {
            case Voice:
                checkBoxEmoji.setChecked(false);
                popUpView = voiceLayout;
                if (!mEnterLayoutStatus) {
                    voiceLayout.setVisibility(View.VISIBLE);
                    emojiKeyboardLayout.setVisibility(View.GONE);
                }
                break;
            case Emoji:
                checkBoxEmoji.setChecked(true);
                popUpView = emojiKeyboardLayout;
                if (!mEnterLayoutStatus) {
                    emojiKeyboardLayout.setVisibility(View.VISIBLE);
                    voiceLayout.setVisibility(View.GONE);
                }
                break;
        }
        mEnterLayoutStatus = mEnterLayoutAnimSupportContainer.isPanelLauoutOpen();
        if (mEnterLayoutStatus) {
            final View dropTarget = dropView;
            final View popUpTarget = popUpView;
            ViewHelper.setTranslationY(popUpView, panelHeight);
            ObjectAnimator drop = ObjectAnimator.ofFloat(dropView, "translationY", 0, panelHeight);
            drop.setDuration(180);
            drop.setInterpolator(new AccelerateInterpolator());
            drop.addListener(new AnimatorListenerAdapter() {
                @Override
                public void onAnimationEnd(Animator animation) {
                    dropTarget.setVisibility(View.GONE);
                    popUpTarget.setVisibility(View.VISIBLE);
                    ObjectAnimator popUp = ObjectAnimator.ofFloat(popUpTarget, "translationY", panelHeight, 0);
                    popUp.setDuration(180);
                    popUp.setInterpolator(new DecelerateInterpolator());
                    popUp.start();
                }
            });
            drop.start();
        } else {
            popUpView.setVisibility(View.VISIBLE);
            animEnterLayoutStatusChanaged(true);
        }
    }
}
 
开发者ID:huang303513,项目名称:Coding-Android,代码行数:51,代码来源:EnterEmojiLayout.java

示例14: alphaAnimation

import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
private void alphaAnimation() {


        ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(getContentRelativeLayout(), "alpha", 0, 1);
        objectAnimator.setDuration(1200);
        objectAnimator.setInterpolator(new DecelerateInterpolator());
        objectAnimator.start();


    }
 
开发者ID:xiangyunwan,项目名称:AndroidSweetSheet-master,代码行数:11,代码来源:CustomDelegate.java


注:本文中的com.nineoldandroids.animation.ObjectAnimator.setInterpolator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。