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


Java Animation.reset方法代碼示例

本文整理匯總了Java中android.view.animation.Animation.reset方法的典型用法代碼示例。如果您正苦於以下問題:Java Animation.reset方法的具體用法?Java Animation.reset怎麽用?Java Animation.reset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.view.animation.Animation的用法示例。


在下文中一共展示了Animation.reset方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: StartAnimations

import android.view.animation.Animation; //導入方法依賴的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

示例2: animateIn

import android.view.animation.Animation; //導入方法依賴的package包/類
public static void animateIn(final @NonNull View view, final @NonNull Animation animation) {
  if (view.getVisibility() == View.VISIBLE) return;

  view.clearAnimation();
  animation.reset();
  animation.setStartTime(0);
  view.setVisibility(View.VISIBLE);
  view.startAnimation(animation);
}
 
開發者ID:XecureIT,項目名稱:PeSanKita-android,代碼行數:10,代碼來源:ViewUtil.java

示例3: setIncomingCall

import android.view.animation.Animation; //導入方法依賴的package包/類
public void setIncomingCall() {
  Animation animation = incomingCallWidget.getAnimation();

  if (animation != null) {
    animation.reset();
    incomingCallWidget.clearAnimation();
  }

  incomingCallWidget.reset(false);
  incomingCallWidget.setVisibility(View.VISIBLE);
  redphoneLabel.setVisibility(View.VISIBLE);

  handler.sendEmptyMessageDelayed(0, 500);
}
 
開發者ID:XecureIT,項目名稱:PeSanKita-android,代碼行數:15,代碼來源:WebRtcIncomingCallOverlay.java

示例4: StartAnimations

import android.view.animation.Animation; //導入方法依賴的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

示例5: startAnimation

import android.view.animation.Animation; //導入方法依賴的package包/類
private void startAnimation() {
    Animation anim = AnimationUtils.loadAnimation(this, R.anim.alpha);
    anim.reset();

    layout.clearAnimation();
    layout.startAnimation(anim);

    anim = AnimationUtils.loadAnimation(this, R.anim.translate);
    anim.reset();
    imageViewSplash.clearAnimation();
    imageViewSplash.startAnimation(anim);
}
 
開發者ID:jlopezmartinez,項目名稱:ZgzFromWithin,代碼行數:13,代碼來源:SplashScreenActivity.java


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