类com.bumptech.glide.request.animation.ViewPropertyAnimation源码实例Demo

下面列出了怎么用com.bumptech.glide.request.animation.ViewPropertyAnimation的API类实例代码及写法,或者点击链接到github查看源代码。

private void loadImageAnimateCode() {
    ViewPropertyAnimation.Animator animationObject = new ViewPropertyAnimation.Animator() {
        @Override
        public void animate(View view) {
            view.setAlpha(0f);

            ObjectAnimator fadeAnim = ObjectAnimator.ofFloat(view, "alpha", 0f, 1f);
            fadeAnim.setDuration(2500);
            fadeAnim.start();
        }
    };

    Glide
            .with(context)
            .load(eatFoodyImages[1])
            .animate(animationObject)
            .into(imageView2);
}
 
源代码2 项目: giffun   文件: DrawableRequestBuilder.java
/**
 * {@inheritDoc}
 */
@Override
public DrawableRequestBuilder<ModelType> animate(ViewPropertyAnimation.Animator animator) {
    super.animate(animator);
    return this;
}
 
源代码3 项目: giffun   文件: GifRequestBuilder.java
/**
 * {@inheritDoc}
 */
@Override
public GifRequestBuilder<ModelType> animate(ViewPropertyAnimation.Animator animator) {
    super.animate(animator);
    return this;
}
 
源代码4 项目: giffun   文件: BitmapRequestBuilder.java
/**
 * {@inheritDoc}
 */
@Override
public BitmapRequestBuilder<ModelType, TranscodeType> animate(ViewPropertyAnimation.Animator animator) {
    super.animate(animator);
    return this;
}
 
源代码5 项目: giffun   文件: GenericRequestBuilder.java
/**
 * Sets an animator to run a {@link android.view.ViewPropertyAnimator} on a view that the target may be wrapping
 * when a resource load finishes. Will only be run if the load was loaded asynchronously (ie was not in the
 * memory cache).
 *
 * @param animator The {@link ViewPropertyAnimation.Animator} to run.
 * @return This request builder.
 */
public GenericRequestBuilder<ModelType, DataType, ResourceType, TranscodeType> animate(
        ViewPropertyAnimation.Animator animator) {
    return animate(new ViewPropertyAnimationFactory<TranscodeType>(animator));
}
 
 类所在包
 类方法
 同包方法