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


Java Animation.setRepeatMode方法代码示例

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


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

示例1: onWindowFocusChanged

import android.view.animation.Animation; //导入方法依赖的package包/类
public void onWindowFocusChanged(boolean hasFocus) {

        if (customProgressDialog == null) {
            return;
        }
        ImageView mprogressImage = (ImageView) findViewById(R.id.loadingImageView);

        Animation animRoute = new RotateAnimation(0.0f, +360.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
        animRoute.setDuration(1000);
        animRoute.setRepeatMode(Animation.RESTART);
        animRoute.setRepeatCount(Animation.INFINITE);

        LinearInterpolator lir = new LinearInterpolator();
        animRoute.setInterpolator(lir);
        mprogressImage.startAnimation(animRoute);
    }
 
开发者ID:haihaio,项目名称:AmenWeather,代码行数:17,代码来源:CustomProgressDialog.java

示例2: onCreate

import android.view.animation.Animation; //导入方法依赖的package包/类
@Override
@SuppressLint("SetJavaScriptEnabled")
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_web);
    WebView webView = (WebView) findViewById(R.id.web_view);
    String url = getIntent().getStringExtra(URL);
    if (url == null && getIntent().getData() != null) {
        url = getIntent().getData().getQueryParameter(URL);
    }
    if (url == null) {
        finish();
    }
    webView.setWebViewClient(new InnerWebViewClient());
    webView.getSettings().setJavaScriptEnabled(true);
    webView.loadUrl(url);

    loading = (TextView) findViewById(R.id.loading);
    Animation animation = new ScaleAnimation(1.0f, 1.2f, 1.0f, 1.2f,
        Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    animation.setRepeatMode(Animation.REVERSE);
    animation.setRepeatCount(Animation.INFINITE);
    animation.setDuration(500);
    loading.startAnimation(animation);
    setTitle(url);
}
 
开发者ID:drakeet,项目名称:Floo,代码行数:27,代码来源:WebActivity.java

示例3: setupAnimation

import android.view.animation.Animation; //导入方法依赖的package包/类
private void setupAnimation() {
    mAnimation = new Animation() {
        @Override
        public void applyTransformation(float interpolatedTime, Transformation t) {
            mRotate = (interpolatedTime);
            invalidate();
        }
    };
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setRepeatMode(Animation.RESTART);
    mAnimation.setInterpolator(LINEAR_INTERPOLATOR);
    mAnimation.setDuration(ANIMATION_DURATION);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:14,代码来源:PhoenixHeader.java

示例4: setupAnimations

import android.view.animation.Animation; //导入方法依赖的package包/类
private void setupAnimations() {
    mAnimation = new Animation() {
        @Override
        public void applyTransformation(float interpolatedTime, @NonNull Transformation t) {
            setLoadingAnimationTime(interpolatedTime);
        }
    };
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setRepeatMode(Animation.REVERSE);
    mAnimation.setInterpolator(ACCELERATE_DECELERATE_INTERPOLATOR);
    mAnimation.setDuration(ANIMATION_DURATION);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:13,代码来源:TaurusHeader.java

示例5: setupAnimations

import android.view.animation.Animation; //导入方法依赖的package包/类
private void setupAnimations() {
    mAnimation = new Animation() {
        @Override
        public void applyTransformation(float interpolatedTime, Transformation t) {
            setRotate(interpolatedTime);
        }
    };
    mAnimation.setRepeatCount(Animation.INFINITE);
    mAnimation.setRepeatMode(Animation.RESTART);
    mAnimation.setInterpolator(LINEAR_INTERPOLATOR);
    mAnimation.setDuration(ANIMATION_DURATION);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:13,代码来源:RentalsSunDrawable.java

示例6: onClick

import android.view.animation.Animation; //导入方法依赖的package包/类
@Override
public void onClick(View view) {

    //Extract values from children
    LinearLayout rowsView = (LinearLayout) rootView.findViewById(R.id.repeatable_items);

    ArrayList<String> row = new ArrayList<>();
    for (int i = 0; i < rowsView.getChildCount(); ++i) {
        EditText et = (EditText) rowsView.getChildAt(i).findViewById(R.id.input_row);
        row.add(et.getText().toString());
    }
    fq.addRow(row);
    TextView tvCount = (TextView) rootView.findViewById(R.id.question_items_count);

    tvCount.setText(fq.getRows().size() + " items");
    Toast.makeText(FormSolverActivity.this, "SAVED", Toast.LENGTH_SHORT).show();

    Animation animation = new ScaleAnimation(1,1.1f,1,1.1f);
    animation.setDuration(300);
    animation.setRepeatMode(Animation.REVERSE);
    animation.setRepeatCount(1);
    tvCount.startAnimation(animation);

    //Remove any child from view
    ((LinearLayout) rootView.findViewById(R.id.repeatable_items)).removeAllViews();
    ((Button) rootView.findViewById(R.id.question_add_response_instance)).setText(getString(R.string.action_new_row));
    rootView.findViewById(R.id.question_add_response_instance).setOnClickListener(new onRowAddedListener(rootView, fq));
    fab.show();
}
 
开发者ID:feup-infolab,项目名称:labtablet,代码行数:30,代码来源:FormSolverActivity.java

示例7: show

import android.view.animation.Animation; //导入方法依赖的package包/类
@Override
public void show() {
    super.show();
    Animation animation = AnimationUtils.loadAnimation(mContext,R.anim.link_slide_left);
    animation.setRepeatCount(Animation.INFINITE);
    animation.setRepeatMode(Animation.RESTART);
    mMaskView.setAnimation(animation);
}
 
开发者ID:SavorGit,项目名称:Hotspot-master-devp,代码行数:9,代码来源:LinkDialog.java

示例8: startBreath

import android.view.animation.Animation; //导入方法依赖的package包/类
protected void startBreath() {
    if (this.mVideoShotButton != null) {
        Animation alphaAnimation = new AlphaAnimation(1.0f, 0.0f);
        alphaAnimation.setDuration(500);
        alphaAnimation.setInterpolator(new LinearInterpolator());
        alphaAnimation.setRepeatCount(-1);
        alphaAnimation.setRepeatMode(2);
        this.mVideoShotButton.startAnimation(alphaAnimation);
        this.mHandler.sendEmptyMessageDelayed(258, 10000);
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:12,代码来源:AlbumBaseControllerFragment.java

示例9: animateTitle

import android.view.animation.Animation; //导入方法依赖的package包/类
public void animateTitle() {
    Animation anim = new ScaleAnimation(
            1f, 1.5f, // Start and end values for the X axis scaling
            1f, 1.5f, // Start and end values for the Y axis scaling
            Animation.RELATIVE_TO_SELF, 1f, // Pivot point of X scaling
            Animation.RELATIVE_TO_SELF, 1f); // Pivot point of Y scaling
    anim.setFillAfter(true); // Needed to keep the result of the animation
    anim.setDuration(1000);
    anim.setRepeatCount(Animation.INFINITE);
    anim.setRepeatMode(ValueAnimator.REVERSE);
    title.startAnimation(anim);
}
 
开发者ID:LenaShervarly,项目名称:TreasureHunting,代码行数:13,代码来源:StartTheGameActivity.java

示例10: blink

import android.view.animation.Animation; //导入方法依赖的package包/类
public static Animation blink() {

        Animation animation = new AlphaAnimation(1, 0);
        animation.setDuration(550);
        animation.setInterpolator(new LinearInterpolator());
        animation.setRepeatCount(10);
        animation.setRepeatMode(Animation.REVERSE);
        return animation;
    }
 
开发者ID:pedromassango,项目名称:Programmers,代码行数:10,代码来源:AnimUtils.java

示例11: AndroidVsIosHeaderView

import android.view.animation.Animation; //导入方法依赖的package包/类
public AndroidVsIosHeaderView(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);
    inflate(context, R.layout.layout_irecyclerview_bat_vs_supper_refresh_header_view, this);
    ivBatMan = (ImageView) findViewById(R.id.ivBatMan);
    ivSuperMan = (ImageView) findViewById(R.id.ivSuperMan);
    ivVs = (ImageView) findViewById(R.id.imageView);

    PropertyValuesHolder translationX1 = PropertyValuesHolder.ofFloat("translationX",0.0f,100.0f,0.0f);
    PropertyValuesHolder rotate = PropertyValuesHolder.ofFloat("rotationY",0.0f,380.0f,0.0f);
    PropertyValuesHolder translationX2 = PropertyValuesHolder.ofFloat("translationX",0.0f,-100.0f,0.0f);

    ObjectAnimator objectAnimator1 = ObjectAnimator.ofPropertyValuesHolder(ivBatMan,  translationX1);
    objectAnimator1.setRepeatCount(ValueAnimator.INFINITE);
    objectAnimator1.setRepeatMode(ValueAnimator.INFINITE);

    ObjectAnimator objectAnimator2 = ObjectAnimator.ofPropertyValuesHolder(ivSuperMan,translationX2);
    objectAnimator2.setRepeatCount(ValueAnimator.INFINITE);
    objectAnimator2.setRepeatMode(ValueAnimator.INFINITE);

    ObjectAnimator objectAnimator3 = ObjectAnimator.ofPropertyValuesHolder(ivVs,  rotate);
    objectAnimator3.setRepeatCount(ValueAnimator.INFINITE);
    objectAnimator3.setRepeatMode(ValueAnimator.INFINITE);

     Animation animation =new RotateAnimation(0f,360f, Animation.RELATIVE_TO_SELF,
            0.5f,Animation.RELATIVE_TO_SELF,0.5f);
    Animation animation1 =new RotateAnimation(0f,-360f, Animation.RELATIVE_TO_SELF,
            0.5f,Animation.RELATIVE_TO_SELF,0.5f);
    animation.setFillAfter(true);
    animation.setDuration(2000);
    animation.setRepeatCount(ValueAnimator.INFINITE);
    animation.setRepeatMode(ValueAnimator.INFINITE);
    animation1.setFillAfter(true);
    animation1.setDuration(2000);
    animation1.setRepeatCount(ValueAnimator.INFINITE);
    animation1.setRepeatMode(ValueAnimator.INFINITE);
    ivBatMan.setAnimation(animation);
    ivSuperMan.setAnimation(animation1);

    btnSexAnimatorSet = new AnimatorSet();
    btnSexAnimatorSet.playTogether(objectAnimator1, objectAnimator2,objectAnimator3);
    btnSexAnimatorSet.setDuration(2000);
    btnSexAnimatorSet.start();

}
 
开发者ID:wp521,项目名称:MyFire,代码行数:45,代码来源:AndroidVsIosHeaderView.java


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