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


Java Animator.end方法代码示例

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


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

示例1: cancelExistingAnimation

import android.animation.Animator; //导入方法依赖的package包/类
/**
 * Cancels any existing animations for given View.
 */
public void cancelExistingAnimation(@NonNull final View view) {
    int hashCode = view.hashCode();
    Animator animator = mAnimators.get(hashCode);
    if (animator != null) {
        animator.end();
        mAnimators.remove(hashCode);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:ViewAnimator.java

示例2: addIndicator

import android.animation.Animator; //导入方法依赖的package包/类
private void addIndicator(int orientation, @DrawableRes int backgroundDrawableId,
        Animator animator) {
    if (animator.isRunning()) {
        animator.end();
        animator.cancel();
    }

    View Indicator = new View(getContext());
    Indicator.setBackgroundResource(backgroundDrawableId);
    addView(Indicator, mIndicatorWidth, mIndicatorHeight);
    LayoutParams lp = (LayoutParams) Indicator.getLayoutParams();

    if (orientation == HORIZONTAL) {
        lp.leftMargin = mIndicatorMargin;
        lp.rightMargin = mIndicatorMargin;
    } else {
        lp.topMargin = mIndicatorMargin;
        lp.bottomMargin = mIndicatorMargin;
    }

    Indicator.setLayoutParams(lp);

    animator.setTarget(Indicator);
    animator.start();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:26,代码来源:CircleIndicator.java

示例3: setAnimationStatus

import android.animation.Animator; //导入方法依赖的package包/类
/**
 * make animation to start or end when target
 * view was be Visible or Gone or Invisible.
 * make animation to cancel when target view
 * be onDetachedFromWindow.
 * @param animStatus
 */
public void setAnimationStatus(AnimStatus animStatus){
    if (mAnimators==null){
        return;
    }
    int count=mAnimators.size();
    for (int i = 0; i < count; i++) {
        Animator animator=mAnimators.get(i);
        boolean isRunning=animator.isRunning();
        switch (animStatus){
            case START:
                if (!isRunning){
                    animator.start();
                }
                break;
            case END:
                if (isRunning){
                    animator.end();
                }
                break;
            case CANCEL:
                if (isRunning){
                    animator.cancel();
                }
                break;
        }
    }
}
 
开发者ID:Mrqinlei,项目名称:ImitateZHRB,代码行数:35,代码来源:BaseIndicatorController.java

示例4: end

import android.animation.Animator; //导入方法依赖的package包/类
/**
 * call function and end
 *
 * @param animator
 * @return
 */
public static boolean end(Animator animator) {
    if (animator != null && animator.isStarted()) {
        animator.end();
        return true;
    }
    return false;
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:14,代码来源:AnimatorUtil.java

示例5: addIndicator

import android.animation.Animator; //导入方法依赖的package包/类
private void addIndicator(@DrawableRes int backgroundDrawableId, Animator animator) {
    if (animator.isRunning()) animator.end();

    View Indicator = new View(getContext());
    Indicator.setBackgroundResource(backgroundDrawableId);
    addView(Indicator, mIndicatorWidth, mIndicatorHeight);
    LayoutParams lp = (LayoutParams) Indicator.getLayoutParams();
    lp.leftMargin = mIndicatorMargin;
    lp.rightMargin = mIndicatorMargin;
    Indicator.setLayoutParams(lp);

    animator.setTarget(Indicator);
    animator.start();
}
 
开发者ID:mityung,项目名称:XERUNG,代码行数:15,代码来源:CircleIndicator.java

示例6: setAnimationStatus

import android.animation.Animator; //导入方法依赖的package包/类
/**
 * make animation to start or end when target
 * view was be Visible or Gone or Invisible.
 * make animation to cancel when target view
 * be onDetachedFromWindow.
 *
 * @param animStatus
 */
public void setAnimationStatus(AnimStatus animStatus) {
    if (mAnimators == null) {
        return;
    }
    int count = mAnimators.size();
    for (int i = 0; i < count; i++) {
        Animator animator = mAnimators.get(i);
        boolean isRunning = animator.isRunning();
        switch (animStatus) {
            case START:
                if (!isRunning) {
                    animator.start();
                }
                break;
            case END:
                if (isRunning) {
                    animator.end();
                }
                break;
            case CANCEL:
                if (isRunning) {
                    animator.cancel();
                }
                break;
        }
    }
}
 
开发者ID:Sugarya,项目名称:Closet,代码行数:36,代码来源:BaseIndicatorController.java

示例7: end

import android.animation.Animator; //导入方法依赖的package包/类
@Override
public void end() {
    Animator a = mAnimator.get();
    if (a != null) {
        a.end();
    }
}
 
开发者ID:SimonCherryGZ,项目名称:JewelryUI,代码行数:8,代码来源:SupportAnimatorLollipop.java

示例8: end

import android.animation.Animator; //导入方法依赖的package包/类
@Override
public void end() {
    Animator a = mAnimator.get();
    if(a != null){
        a.end();
    }
}
 
开发者ID:aliumujib,项目名称:Nibo,代码行数:8,代码来源:SupportAnimatorLollipop.java

示例9: endAnimations

import android.animation.Animator; //导入方法依赖的package包/类
@Override
public void endAnimations() {
    final List<Animator> animatorList = new ArrayList<>(mAnimators.values());
    for (Animator animator : animatorList) {
        animator.end();
    }
    dispatchFinishedWhenDone();
}
 
开发者ID:SysdataSpA,项目名称:FancyAccordionView,代码行数:9,代码来源:ItemAnimator.java

示例10: setAnimationStatus

import android.animation.Animator; //导入方法依赖的package包/类
public void setAnimationStatus(AnimStatus status) {
    if (mAnimators == null) {
        return;
    }
    int count = mAnimators.size();
    for (int i = 0; i < count; i++) {
        Animator animator = mAnimators.get(i);
        boolean isRunning = animator.isRunning();
        switch (status) {
            case START:
                if (!isRunning) {
                    animator.start();
                }
                break;
            case END:
                if (isRunning) {
                    animator.end();
                }
                break;
            case CANCEL:
                if (isRunning) {
                    animator.cancel();
                }
                break;
        }
    }
}
 
开发者ID:wuhighway,项目名称:DailyStudy,代码行数:28,代码来源:BallSpinFadeLoadingView.java

示例11: setAnimationStatus

import android.animation.Animator; //导入方法依赖的package包/类
public void setAnimationStatus(BallSpinFadeLoadingView.AnimStatus status) {
    if (mAnimators == null) {
        return;
    }
    int count = mAnimators.size();
    for (int i = 0; i < count; i++) {
        Animator animator = mAnimators.get(i);
        boolean isRunning = animator.isRunning();
        switch (status) {
            case START:
                if (!isRunning) {
                    animator.start();
                }
                break;
            case END:
                if (isRunning) {
                    animator.end();
                }
                break;
            case CANCEL:
                if (isRunning) {
                    animator.cancel();
                }
                break;
        }
    }
}
 
开发者ID:wuhighway,项目名称:DailyStudy,代码行数:28,代码来源:BallPulseLoadingView.java

示例12: cancelExistingAnimation

import android.animation.Animator; //导入方法依赖的package包/类
/**
 * Cancels any existing animations for given View. Useful when fling.
 */
private void cancelExistingAnimation(final int hashCode) {
	Animator animator = mAnimators.get(hashCode);
	if (animator != null) animator.end();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:AnimatorAdapter.java


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