本文整理了Java中android.view.animation.Animation.setFillBefore()
方法的一些代码示例,展示了Animation.setFillBefore()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Animation.setFillBefore()
方法的具体详情如下:
包路径:android.view.animation.Animation
类名称:Animation
方法名:setFillBefore
暂无
代码示例来源:origin: Tencent/RapidView
public void run(AnimationObject object, Object animation, String value){
((Animation)animation).setFillBefore(RapidStringUtils.stringToBoolean(value));
}
}
代码示例来源:origin: stackoverflow.com
Animation fadeIn = new AlphaAnimation(0, 1);
fadeIn.setInterpolator(new DecelerateInterpolator()); // add this
fadeIn.setDuration(fadeInDuration);
fadeIn.setFillEnabled(true); // to apply setFillBefore and setFillAfter
fadeIn.setFillBefore(true); // it means that at start of animation you set alpha="0"
fadeIn.setFillAfter(false);
iv.setAnimation(fadeIn);
iv.startAnimation(fadeIn);
代码示例来源:origin: OceanLabs/Android-Print-SDK
/*****************************************************
*
* Starts the display cycle.
*
*****************************************************/
public void startDisplayCycle()
{
mPromptTextView.setVisibility( View.VISIBLE );
mInAnimation = new TranslateAnimation(
Animation.RELATIVE_TO_SELF, 0,
Animation.RELATIVE_TO_SELF, 0,
Animation.RELATIVE_TO_SELF, -1f,
Animation.RELATIVE_TO_SELF, 0 );
mInAnimation.setDuration( IN_ANIMATION_DURATION_MILLIS );
mInAnimation.setFillBefore( true );
mInAnimation.setFillAfter( true );
mInAnimation.setAnimationListener( new OutAnimationTrigger() );
mPromptTextView.startAnimation( mInAnimation );
}
代码示例来源:origin: OceanLabs/Android-Print-SDK
/*****************************************************
*
* Called after a delay whilst the prompt text is displayed
* on screen.
*
*****************************************************/
@Override
public void run()
{
// Create and start the out animation. Once the out animation
// has finished, we clear the animation and hide the view.
Animation outAnimation = new TranslateAnimation(
Animation.RELATIVE_TO_SELF, 0,
Animation.RELATIVE_TO_SELF, 0,
Animation.RELATIVE_TO_SELF, 0,
Animation.RELATIVE_TO_SELF, -1f );
outAnimation.setDuration( OUT_ANIMATION_DURATION_MILLIS );
outAnimation.setFillBefore( true );
outAnimation.setFillAfter( true );
outAnimation.setAnimationListener( new VisibilitySettingAnimationListener( mPromptTextView, View.GONE ) );
mPromptTextView.startAnimation( outAnimation );
}
}
代码示例来源:origin: jakebonk/BoardView
Animation.RELATIVE_TO_SELF, 0f); // Pivot point of Y scaling
anim.setFillAfter(true); // Needed to keep the result of the animation
anim.setFillBefore(false);
anim.setFillEnabled(true);
anim.setDuration(ANIM_TIME);
代码示例来源:origin: hiteshsahu/ECommerce-App-Android
public LabelView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init();
_animation.setFillBefore(true);
_animation.setFillAfter(true);
_animation.setFillEnabled(true);
}
代码示例来源:origin: stackoverflow.com
translateAnim.setFillAfter(true);
translateAnim.setFillEnabled(true);
translateAnim.setFillBefore(false);
translateAnim.setAnimationListener(new Animation.AnimationListener() {
@Override
代码示例来源:origin: stackoverflow.com
a.setDuration(500);
a.setFillAfter(false);
a.setFillBefore(false);
a.setFillEnabled(true);
set.addAnimation(a);
a.setDuration(500);
a.setFillAfter(false);
a.setFillBefore(false);
a.setFillEnabled(true);
set.addAnimation(a);
代码示例来源:origin: Scalified/viewmover
/**
* Creates the moving animation
* <p>
* Configures the moving animation based on moving params
*
* @param params params, which is used to configure the moving animation
* @return moving animation
*/
private Animation createAnimation(MovingParams params) {
Animation animation = new TranslateAnimation(0, params.getXAxisDelta(), 0, params.getYAxisDelta());
animation.setFillEnabled(true);
animation.setFillBefore(false);
animation.setDuration(params.getAnimationDuration());
Interpolator interpolator = params.getAnimationInterpolator();
if (interpolator != null) {
animation.setInterpolator(interpolator);
}
animation.setAnimationListener(new MoveAnimationListener(params));
return animation;
}
代码示例来源:origin: stackoverflow.com
ScaleAnimation.ABSOLUTE, 250);
rectAnim1.setFillBefore(false);
rectAnim1.setFillAfter(true);
rectAnim1.setStartOffset(500);
代码示例来源:origin: flipkart-incubator/proteus
anim.setFillBefore(fillBefore);
代码示例来源:origin: stackoverflow.com
AnimationSet anim = new AnimationSet(false);
final Animation ballInAnimation = AnimationUtils.loadAnimation(this,
R.anim.ball_in);
ballInAnimation.setFillBefore(true);
final Animation ballShiftAnimation = AnimationUtils.loadAnimation(this,R.anim.ball_shift);
ballShiftAnimation.setStartOffset(ballInAnimation.getDuration());
final Animation ballOutAnimation = AnimationUtils.loadAnimation(this,R.anim.ball_out);
ballOutAnimation.setStartOffset(ballInAnimation.getDuration()+ ballShiftAnimation.getDuration());
anim.addAnimation(ballInAnimation);
anim.addAnimation(ballShiftAnimation);
anim.addAnimation(ballOutAnimation);
anim.setFillAfter(true);
ballImage.startAnimation(anim);
内容来源于网络,如有侵权,请联系作者删除!