當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。