예제 #1
0
 @Override
 public void onActivated(Uri rideUri) {
   if (!rideUri.equals(mRideUri)) return;
   mChkRecord.setChecked(true, false);
   mChkRecordText.setText(R.string.display_chkRecord_active);
   if (!mChkRecordTextAnimator.isStarted()) mChkRecordTextAnimator.start();
 }
예제 #2
0
 @Override
 public void onPaused(Uri rideUri) {
   if (!rideUri.equals(mRideUri)) return;
   mChkRecord.setChecked(false, false);
   mChkRecordText.setText(R.string.display_chkRecord_paused);
   if (mChkRecordTextAnimator.isStarted()) mChkRecordTextAnimator.cancel();
   mChkRecordText.setAlpha(1f);
 }
 private boolean isStarted() {
   final ArrayList<Animator> animators = mAnimatedVectorState.mAnimators;
   final int size = animators.size();
   for (int i = 0; i < size; i++) {
     final Animator animator = animators.get(i);
     if (animator.isStarted()) {
       return true;
     }
   }
   return false;
 }
 @Override
 public void start() {
   final ArrayList<Animator> animators = mAnimatedVectorState.mAnimators;
   final int size = animators.size();
   for (int i = 0; i < size; i++) {
     final Animator animator = animators.get(i);
     if (!animator.isStarted()) {
       animator.start();
     }
   }
   invalidateSelf();
 }