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


Java AlphaAnimation.setRepeatCount方法代码示例

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


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

示例1: startIconsEditing

import android.view.animation.AlphaAnimation; //导入方法依赖的package包/类
public void startIconsEditing() {
    mDockIconsEditAnimation = new AlphaAnimation(0.4f, 1.0f);
    mDockIconsEditAnimation.setDuration(260);
    mDockIconsEditAnimation.setRepeatMode(Animation.REVERSE);
    mDockIconsEditAnimation.setRepeatCount(Animation.INFINITE);

    iterateOverDockIcons((dockItem, dockIconColumn) -> {
        dockItem.setOnClickListener(view -> showSelectAppForIconAtColumn(dockIconColumn));

        dockItem.startAnimation(mDockIconsEditAnimation);
    });
}
 
开发者ID:OhMyLob,项目名称:Paper-Launcher,代码行数:13,代码来源:HomeScreenDockFragment.java

示例2: wave

import android.view.animation.AlphaAnimation; //导入方法依赖的package包/类
public void wave() {
    AnimationSet as = new AnimationSet(true);
    ScaleAnimation sa = new ScaleAnimation(1f, 1.5f, 1f, 1.5f, ScaleAnimation.RELATIVE_TO_SELF,
            0.5f, ScaleAnimation.RELATIVE_TO_SELF, 0.5f);
    sa.setDuration(ANIMATIONEACHOFFSET * 3);
    sa.setRepeatCount(10);// 设置循环
    AlphaAnimation aniAlp = new AlphaAnimation(1, 0.1f);
    aniAlp.setRepeatCount(10);// 设置循环
    as.setDuration(ANIMATIONEACHOFFSET * 3);
    as.addAnimation(sa);
    as.addAnimation(aniAlp);
    labelIcon.startAnimation(as);
}
 
开发者ID:Sherchen,项目名称:AnimationsDemo,代码行数:14,代码来源:LabelView.java

示例3: loadAnimations

import android.view.animation.AlphaAnimation; //导入方法依赖的package包/类
private void loadAnimations() {
    mBlinkAnimation = new AlphaAnimation(0.0f, 1.0f);
    mBlinkAnimation.setDuration(500);
    mBlinkAnimation.setRepeatMode(Animation.REVERSE);
    mBlinkAnimation.setRepeatCount(Animation.INFINITE);
}
 
开发者ID:dvdciri,项目名称:DeepImagePreview-Project,代码行数:7,代码来源:ScanFragment.java

示例4: onClick

import android.view.animation.AlphaAnimation; //导入方法依赖的package包/类
@Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.btn_translate:
                TranslateAnimation animation = new TranslateAnimation(0, 300, 0, 0);
                animation.setDuration(1000);
                animation.setFillAfter(true);
//                animation.setInterpolator(new AccelerateInterpolator());//先慢后快
                btnTranslate.startAnimation(animation);
                break;
            case R.id.btn_rotate:
                RotateAnimation rotateAnimation = new RotateAnimation(0, 90, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
                rotateAnimation.setDuration(1000);
                rotateAnimation.setFillAfter(true);
                btnRotate.startAnimation(rotateAnimation);
                break;
            case R.id.btn_fade:
                AlphaAnimation alphaAnimation = new AlphaAnimation(1, 0.3f);//起始透明度
                alphaAnimation.setDuration(1000);
//                scaleAnimation.setFillAfter(true);
                alphaAnimation.setRepeatCount(2);
                btnFade.startAnimation(alphaAnimation);
                break;
            case R.id.btn_scale:
                ScaleAnimation scaleAnimation = new ScaleAnimation(1, 2, 1, 2);
                scaleAnimation.setDuration(1000);
                btnScale.startAnimation(scaleAnimation);
                break;
            case R.id.btn_combination:
                TranslateAnimation animation1 = new TranslateAnimation(0, 300, 0, 0);
                animation1.setDuration(1000);
                animation1.setFillAfter(true);
                AlphaAnimation animation2 = new AlphaAnimation(1, 0.3f);//起始透明度
                animation2.setDuration(1000);
//                scaleAnimation.setFillAfter(true);
                animation2.setRepeatCount(2);

                AnimationSet animationSet = new AnimationSet(false);
                animationSet.addAnimation(animation1);
                animationSet.addAnimation(animation2);
                btnCombination.startAnimation(animationSet);
                break;
        }
    }
 
开发者ID:supremezzz,项目名称:Supreme,代码行数:45,代码来源:TweenAnimationActivity.java


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