本文整理汇总了Java中android.view.animation.Animation.start方法的典型用法代码示例。如果您正苦于以下问题:Java Animation.start方法的具体用法?Java Animation.start怎么用?Java Animation.start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.view.animation.Animation
的用法示例。
在下文中一共展示了Animation.start方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onPostExecute
import android.view.animation.Animation; //导入方法依赖的package包/类
/**
* Once the image is downloaded, associates it to the imageView
*/
@Override
protected void onPostExecute(Bitmap bitmap) {
if (isCancelled()) {
bitmap = null;
}
addBitmapToCache(position, bitmap);
if (imageViewReference != null) {
ImageView imageView = imageViewReference.get();
BitmapFetcherTask bitmapDownloaderTask = getBitmapDownloaderTask(imageView);
if (this == bitmapDownloaderTask) {
imageView.setImageBitmap(bitmap);
Animation anim = AnimationUtils.loadAnimation(imageView.getContext(), android.R.anim.fade_in);
imageView.setAnimation(anim);
anim.start();
}
} else {
setInvisible();
}
}
示例2: onFocusChange
import android.view.animation.Animation; //导入方法依赖的package包/类
@Override
public void onFocusChange(View v, boolean hasFocus) {
int focus = 0;
if (hasFocus) {
focus = R.anim.enlarge;
} else {
focus = R.anim.decrease;
}
//如果有焦点就放大,没有焦点就缩小
Animation mAnimation = AnimationUtils.loadAnimation(
getActivity().getApplication(), focus);
mAnimation.setBackgroundColor(Color.TRANSPARENT);
mAnimation.setFillAfter(hasFocus);
v.startAnimation(mAnimation);
mAnimation.start();
v.bringToFront();
}
示例3: onFocusChange
import android.view.animation.Animation; //导入方法依赖的package包/类
@Override
public void onFocusChange(View v, boolean hasFocus) {
int focus = 0;
if (hasFocus) {
focus = R.anim.enlarge;
} else {
focus = R.anim.decrease;
}
// 如果有焦点就放大,没有焦点就缩小
Animation mAnimation = AnimationUtils.loadAnimation(
mContext, focus);
mAnimation.setBackgroundColor(Color.TRANSPARENT);
mAnimation.setFillAfter(hasFocus);
v.startAnimation(mAnimation);
mAnimation.start();
v.bringToFront();
}
示例4: startAnimations
import android.view.animation.Animation; //导入方法依赖的package包/类
public void startAnimations(){
Glide.with(this)
.load(getString(R.string.login_background_url))
.apply(new RequestOptions().centerCrop())
.transition(withCrossFade())
.into(background);
Animation animation = AnimationUtils.loadAnimation(getContext(), R.anim.login_anim);
animation.start();
Animation animation2 = AnimationUtils.loadAnimation(getContext(), R.anim.login_card_anim);
animation2.start();
Animation animation3 = AnimationUtils.loadAnimation(getContext(), R.anim.login_text_anim);
animation3.start();
loginLogo.startAnimation(animation);
loginCard.startAnimation(animation2);
logoText.startAnimation(animation3);
}
示例5: startScanAnim
import android.view.animation.Animation; //导入方法依赖的package包/类
/**
* 开始扫面动画以及控制view的操作
*/
private void startScanAnim() {
mScanIv.setVisibility(View.VISIBLE);
Animation scanAnim = AnimationUtils.loadAnimation(this, R.anim.scan);
mScanIv.setAnimation(scanAnim);
scanAnim.start();
Animation notify = AnimationUtils.loadAnimation(this, R.anim.right_in);
mScanNotifyLayout.setAnimation(notify);
notify.start();
mScanNotifyLayout.setVisibility(View.VISIBLE);
mScanTimer.setBase(SystemClock.elapsedRealtime());
mScanTimer.start();
mToolsLayout.setVisibility(View.GONE);
mResolveTv.setEnabled(false);
mRotationTv.setEnabled(false);
mLangTv.setEnabled(false);
}
示例6: stopScanAnim
import android.view.animation.Animation; //导入方法依赖的package包/类
/**
* 停止扫描动画以及控制view的操作
*/
private void stopScanAnim() {
try {
if (mScanIv.getAnimation() != null) {
mScanIv.getAnimation().cancel();
mScanIv.clearAnimation();
mScanIv.setVisibility(View.GONE);
}
} catch (Exception e) {// NullPointerException
e.printStackTrace();
}
Animation notify = AnimationUtils.loadAnimation(this, R.anim.right_out);
mScanNotifyLayout.setAnimation(notify);
notify.start();
mScanNotifyLayout.setVisibility(View.GONE);
mScanTimer.stop();
isStarting = false;
mStartTv.setText(R.string.string_start);
mResolveTv.setEnabled(true);
mRotationTv.setEnabled(true);
mLangTv.setEnabled(true);
}
示例7: show
import android.view.animation.Animation; //导入方法依赖的package包/类
public void show() {
try {
super.show();
if (this.mDialogDisplayCallback != null) {
this.mDialogDisplayCallback.onShow();
}
StatisticsUtil.statistics(12);
Animation anima = AnimationUtils.loadAnimation(RedPacketSdkManager.getInstance().getApplicationContext(), R.anim.forecast_view_show);
this.mforecastView.setAnimation(anima);
anima.start();
} catch (Exception e) {
}
}
示例8: animator
import android.view.animation.Animation; //导入方法依赖的package包/类
private void animator(final ImageButton imageButton){
Animation animation = AnimationUtils.loadAnimation(getContext(),R.anim.color_item);
animation.setInterpolator(new AccelerateInterpolator());
imageButton.setAnimation(animation);
imageButton.setVisibility(View.VISIBLE);
animation.start();
}
示例9: startAnimations
import android.view.animation.Animation; //导入方法依赖的package包/类
public void startAnimations(){
Animation animation = AnimationUtils.loadAnimation(getContext(), R.anim.splash_anim);
animation.start();
splashLogo.clearAnimation();
splashLogo.startAnimation(animation);
}