本文整理汇总了Java中com.nineoldandroids.animation.ObjectAnimator.setStartDelay方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectAnimator.setStartDelay方法的具体用法?Java ObjectAnimator.setStartDelay怎么用?Java ObjectAnimator.setStartDelay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.nineoldandroids.animation.ObjectAnimator
的用法示例。
在下文中一共展示了ObjectAnimator.setStartDelay方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setInAnimation
import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
protected void setInAnimation(View view) {
iconView=view.findViewById(android.R.id.icon);
if(iconView!=null){
msgView=view.findViewById(android.R.id.message);
ViewHelper.setAlpha(msgView,0f);
ViewHelper.setPivotX(msgView, 0);
ViewHelper.setPivotY(msgView, 0);
ObjectAnimator msgScaleAnim=ObjectAnimator.ofFloat(msgView, "scaleX", 0, .5f, 1, 1.1f, 1).setDuration(s * 2);
ObjectAnimator msgAlphaAnim=ObjectAnimator.ofFloat(msgView, "alpha", 1).setDuration(s * 2);
msgScaleAnim.setStartDelay(s+m);
msgAlphaAnim.setStartDelay(s+m);
getAnimatorSet().playTogether(
ObjectAnimator.ofFloat(iconView, "scaleX", 0, .5f, 1,.9f,1,1.2f,1).setDuration(s),
ObjectAnimator.ofFloat(iconView,"scaleY",0,.5f,1,1.2f,1,.9f,1).setDuration(s),
msgScaleAnim,
msgAlphaAnim
);
}
}
示例2: setOutAnimation
import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
protected void setOutAnimation(View view) {
iconView=view.findViewById(android.R.id.icon);
if(iconView!=null) {
msgView = view.findViewById(android.R.id.message);
ObjectAnimator iconScaleXAnim = ObjectAnimator.ofFloat(iconView, "scaleX", 1, 1.2f, 1, .9f, 1, .5f, 0).setDuration(e * 2);
ObjectAnimator iconScaleYAnim = ObjectAnimator.ofFloat(iconView, "scaleY", 1, .9f, 1, 1.2f, 1, .5f, 0).setDuration(e * 2);
ObjectAnimator iconAlphaAnim = ObjectAnimator.ofFloat(iconView, "alpha", 1, 0).setDuration(e * 2);
iconScaleXAnim.setStartDelay(e + m);
iconScaleYAnim.setStartDelay(e + m);
iconAlphaAnim.setStartDelay(e + m);
getAnimatorSet().playTogether(
ObjectAnimator.ofFloat(msgView, "scaleX", 1, 1.1f, 1, .5f, 0).setDuration(e),
iconScaleXAnim,
iconScaleYAnim,
iconAlphaAnim
);
}
}
示例3: setAnimation
import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
@Override
public void setAnimation(View view) {
ObjectAnimator rotationX = ObjectAnimator.ofFloat(view, "rotationX", 10, 0f).setDuration(150);
rotationX.setStartDelay(200);
animatorSet.playTogether(
ObjectAnimator.ofFloat(view, "scaleX", 1.0f, 0.8f).setDuration(350),
ObjectAnimator.ofFloat(view, "scaleY", 1.0f, 0.8f).setDuration(350),
// ObjectAnimator.ofFloat(view, "alpha", 1.0f, 0.5f).setDuration(350),
ObjectAnimator.ofFloat(view, "rotationX", 0f, 10).setDuration(200),
rotationX,
ObjectAnimator.ofFloat(view, "translationY", 0, -0.1f * dm.heightPixels).setDuration(350)
);
}
示例4: 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();
}
示例5: startShow
import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
public static void startShow(View view, float fromAlpha, long duration, long startDelay) {
ViewHelper.setAlpha(view, fromAlpha);
view.setVisibility(View.VISIBLE);
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "alpha", fromAlpha, 1f).setDuration(duration);
objectAnimator.setStartDelay(startDelay);
objectAnimator.start();
}
示例6: startHide
import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
public static void startHide(final View view, long duration, long startDelay) {
view.setVisibility(View.VISIBLE);
ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(view, "alpha", ViewHelper.getAlpha(view), 0f).setDuration(duration);
objectAnimator.setStartDelay(startDelay);
objectAnimator.start();
}
示例7: 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();
}
示例8: setCurrentView
import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
private void setCurrentView(int currentView, boolean forceRefresh) {
long timeInMillis = mCalendar.getTimeInMillis();
switch (currentView) {
case MONTH_AND_DAY_VIEW:
ObjectAnimator monthDayAnim = Utils.getPulseAnimator(mMonthAndDayView, 0.9F, 1.05F);
if (mDelayAnimation) {
monthDayAnim.setStartDelay(ANIMATION_DELAY);
mDelayAnimation = false;
}
mDayPickerView.onDateChanged();
if (mCurrentView != currentView || forceRefresh) {
mMonthAndDayView.setSelected(true);
mYearView.setSelected(false);
mAnimator.setDisplayedChild(MONTH_AND_DAY_VIEW);
mCurrentView = currentView;
}
monthDayAnim.start();
String monthDayDesc = DateUtils.formatDateTime(getActivity(), timeInMillis, DateUtils.FORMAT_SHOW_DATE);
mAnimator.setContentDescription(mDayPickerDescription + ": " + monthDayDesc);
Utils.tryAccessibilityAnnounce(mAnimator, mSelectDay);
break;
case YEAR_VIEW:
ObjectAnimator yearAnim = Utils.getPulseAnimator(mYearView, 0.85F, 1.1F);
if (mDelayAnimation) {
yearAnim.setStartDelay(ANIMATION_DELAY);
mDelayAnimation = false;
}
mYearPickerView.onDateChanged();
if (mCurrentView != currentView || forceRefresh) {
mMonthAndDayView.setSelected(false);
mYearView.setSelected(true);
mAnimator.setDisplayedChild(YEAR_VIEW);
mCurrentView = currentView;
}
yearAnim.start();
String dayDesc = YEAR_FORMAT.format(timeInMillis);
mAnimator.setContentDescription(mYearPickerDescription + ": " + dayDesc);
Utils.tryAccessibilityAnnounce(mAnimator, mSelectYear);
break;
}
}
示例9: setCurrentView
import com.nineoldandroids.animation.ObjectAnimator; //导入方法依赖的package包/类
private void setCurrentView(int currentView, boolean forceRefresh) {
long timeInMillis = mCalendar.getTimeInMillis();
switch (currentView) {
case MONTH_AND_DAY_VIEW:
ObjectAnimator monthDayAnim = Utils.getPulseAnimator(
mMonthAndDayView, 0.9F, 1.05F);
if (mDelayAnimation) {
monthDayAnim.setStartDelay(ANIMATION_DELAY);
mDelayAnimation = false;
}
mDayPickerView.onDateChanged();
if (mCurrentView != currentView || forceRefresh) {
mMonthAndDayView.setSelected(true);
mYearView.setSelected(false);
mAnimator.setDisplayedChild(MONTH_AND_DAY_VIEW);
mCurrentView = currentView;
}
monthDayAnim.start();
String monthDayDesc = DateUtils.formatDateTime(getActivity(),
timeInMillis, DateUtils.FORMAT_SHOW_DATE);
mAnimator.setContentDescription(mDayPickerDescription + ": "
+ monthDayDesc);
Utils.tryAccessibilityAnnounce(mAnimator, mSelectDay);
break;
case YEAR_VIEW:
ObjectAnimator yearAnim = Utils.getPulseAnimator(mYearView, 0.85F,
1.1F);
if (mDelayAnimation) {
yearAnim.setStartDelay(ANIMATION_DELAY);
mDelayAnimation = false;
}
mYearPickerView.onDateChanged();
if (mCurrentView != currentView || forceRefresh) {
mMonthAndDayView.setSelected(false);
mYearView.setSelected(true);
mAnimator.setDisplayedChild(YEAR_VIEW);
mCurrentView = currentView;
}
yearAnim.start();
String dayDesc = YEAR_FORMAT.format(timeInMillis);
mAnimator.setContentDescription(mYearPickerDescription + ": "
+ dayDesc);
Utils.tryAccessibilityAnnounce(mAnimator, mSelectYear);
break;
}
}