本文整理匯總了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);
}