本文整理汇总了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});
}
}
示例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});
}
}
示例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;
}
示例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;
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
示例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);
}
}
}
示例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();
}