當前位置: 首頁>>代碼示例>>Java>>正文


Java Animation.start方法代碼示例

本文整理匯總了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();
    }
}
 
開發者ID:abelabbesnabi,項目名稱:cordova-plugin-image-picker,代碼行數:23,代碼來源:ImageFetcher.java

示例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();
}
 
開發者ID:Evan-Galvin,項目名稱:FreeStreams-TVLauncher,代碼行數:19,代碼來源:WoDouGameBaseFragment.java

示例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();
        }
 
開發者ID:Evan-Galvin,項目名稱:FreeStreams-TVLauncher,代碼行數:19,代碼來源:AllApp.java

示例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);
}
 
開發者ID:jakdor,項目名稱:LabDayApp,代碼行數:21,代碼來源:LoginFragment.java

示例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);
}
 
開發者ID:shenhuanet,項目名稱:Ocr-android,代碼行數:23,代碼來源:RecognitionActivity.java

示例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);
}
 
開發者ID:shenhuanet,項目名稱:Ocr-android,代碼行數:28,代碼來源:RecognitionActivity.java

示例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) {
    }
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:14,代碼來源:RedPacketForecastDialog.java

示例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();
}
 
開發者ID:delaroy,項目名稱:MaterialColorPickerDialog,代碼行數:8,代碼來源:ColorChooserDialog.java

示例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);
}
 
開發者ID:jakdor,項目名稱:LabDayApp,代碼行數:8,代碼來源:SplashFragment.java


注:本文中的android.view.animation.Animation.start方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。