本文整理汇总了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);
}
}
示例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);
}
示例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();
}
示例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);
}
}
}
示例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();
}