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


Java ImageView.clearAnimation方法代码示例

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


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

示例1: showStatusView

import android.widget.ImageView; //导入方法依赖的package包/类
private void showStatusView(boolean loading) {
    if (mStatusView == null) {
        mStatusView = ((ViewStub) findViewById(R.id.view_stub)).inflate();
        mStatusLoadingImg = (ImageView) mStatusView.findViewById(R.id.status_loading_img);
        mStatusReloadBtn = (Button) mStatusView.findViewById(R.id.status_reload_button);
        mStatusNoDataImg = (ImageView) mStatusView.findViewById(R.id.status_no_data_img);

        mStatusReloadBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                showStatusView(true);
                getPresenter().loadMovieData();
            }
        });
    }
    if (loading) {
        Animation animation = AnimationUtils.loadAnimation(this, R.anim.anim_rotate);
        animation.setInterpolator(new LinearInterpolator());
        mStatusLoadingImg.setAnimation(animation);
        mStatusLoadingImg.setVisibility(View.VISIBLE);
        mStatusReloadBtn.setVisibility(View.INVISIBLE);
        mStatusNoDataImg.setVisibility(View.INVISIBLE);
    } else {
        mStatusLoadingImg.clearAnimation();
        mStatusLoadingImg.setVisibility(View.INVISIBLE);
        mStatusReloadBtn.setVisibility(View.VISIBLE);
        mStatusNoDataImg.setVisibility(View.VISIBLE);
    }
}
 
开发者ID:woxingxiao,项目名称:GracefulMovies,代码行数:30,代码来源:MainActivity.java

示例2: rollTapped

import android.widget.ImageView; //导入方法依赖的package包/类
public void rollTapped(View view)
{

    Random random=new Random();
    int randomNumber=random.nextInt(6);
    ImageView img= (ImageView) findViewById(R.id.dice);
    img.clearAnimation();
    img.setImageResource(dice[randomNumber]);
    img.animate().rotationYBy(180);
}
 
开发者ID:jamesgeorge007,项目名称:Roll-The-Dice-Android-Application,代码行数:11,代码来源:MainActivity.java

示例3: StartAnimations

import android.widget.ImageView; //导入方法依赖的package包/类
private void StartAnimations() {
        Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
        anim.reset();
        LinearLayout l = (LinearLayout) findViewById(R.id.lin_lay);
        l.clearAnimation();
        l.startAnimation(anim);

        anim = AnimationUtils.loadAnimation(this, R.anim.translate);
        anim.reset();
        ImageView iv = (ImageView) findViewById(R.id.bard_splash);
        iv.clearAnimation();
        iv.startAnimation(anim);

    splashTread = new Thread() {
        @Override
        public void run() {
            try {
                int waited = 0;
                // Splash screen pause time
                while (waited < 3500) {
                    sleep(100);
                    waited += 100;
                }
                Intent intent = new Intent(SplashActivity.this,
                        MainActivity.class);
                intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
                startActivity(intent);
                SplashActivity.this.finish();
            } catch (InterruptedException e) {
                // do nothing
            } finally {
                SplashActivity.this.finish();
            }

        }
    };
    splashTread.start();

}
 
开发者ID:ma8642,项目名称:FindSpot,代码行数:40,代码来源:SplashActivity.java

示例4: onPostExecute

import android.widget.ImageView; //导入方法依赖的package包/类
@Override
protected void onPostExecute(Bitmap bitmap) {
    if (imageViewReference != null && bitmap != null) {
        final ImageView imageView = imageViewReference.get();
        if (imageView != null) {
            imageView.setImageBitmap(bitmap);
            imageView.clearAnimation();
            imageView.startAnimation(mFadeInAnimation);
        }
    }
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-android,代码行数:12,代码来源:BitmapWorkerTask.java

示例5: StartAnimations

import android.widget.ImageView; //导入方法依赖的package包/类
private void StartAnimations() {


        Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
        anim.reset();
        LinearLayout l = (LinearLayout) findViewById(R.id.lin_lay);
        l.clearAnimation();
        l.startAnimation(anim);
        anim = AnimationUtils.loadAnimation(this, R.anim.rotate);
        anim.reset();

        ImageView iv = (ImageView) findViewById(R.id.splash);

        iv.clearAnimation();
        iv.startAnimation(anim);

        splashTread = new Thread() {
            @Override
            public void run() {
                try {
                    int waited = 0;
                    while (waited < 3500) {
                        sleep(100);
                        waited += 100;
                    }
                    Intent intent = new Intent(Splashscreen.this,
                            MainActivity.class);
                    intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);

                    startActivity(intent);
                    Splashscreen.this.finish();

                } catch (InterruptedException e) {

                } finally {
                    Splashscreen.this.finish();
                }
            }
        };
        splashTread.start();
    }
 
开发者ID:lmartire,项目名称:DoApp,代码行数:42,代码来源:Splashscreen.java


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