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


Java Animation.hasEnded方法代碼示例

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


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

示例1: updateSubviewClipStatus

import android.view.animation.Animation; //導入方法依賴的package包/類
private void updateSubviewClipStatus(Rect clippingRect, int idx, int clippedSoFar) {
  View child = Assertions.assertNotNull(mAllChildren)[idx];
  sHelperRect.set(child.getLeft(), child.getTop(), child.getRight(), child.getBottom());
  boolean intersects = clippingRect
      .intersects(sHelperRect.left, sHelperRect.top, sHelperRect.right, sHelperRect.bottom);
  boolean needUpdateClippingRecursive = false;
  // We never want to clip children that are being animated, as this can easily break layout :
  // when layout animation changes size and/or position of views contained inside a listview that
  // clips offscreen children, we need to ensure that, when view exits the viewport, final size
  // and position is set prior to removing the view from its listview parent.
  // Otherwise, when view gets re-attached again, i.e when it re-enters the viewport after scroll,
  // it won't be size and located properly.
  Animation animation = child.getAnimation();
  boolean isAnimating = animation != null && !animation.hasEnded();
  if (!intersects && child.getParent() != null && !isAnimating) {
    // We can try saving on invalidate call here as the view that we remove is out of visible area
    // therefore invalidation is not necessary.
    super.removeViewsInLayout(idx - clippedSoFar, 1);
    needUpdateClippingRecursive = true;
  } else if (intersects && child.getParent() == null) {
    super.addViewInLayout(child, idx - clippedSoFar, sDefaultLayoutParam, true);
    invalidate();
    needUpdateClippingRecursive = true;
  } else if (intersects) {
    // If there is any intersection we need to inform the child to update its clipping rect
    needUpdateClippingRecursive = true;
  }
  if (needUpdateClippingRecursive) {
    if (child instanceof ReactClippingViewGroup) {
      // we don't use {@link sHelperRect} until the end of this loop, therefore it's safe
      // to call this method that may write to the same {@link sHelperRect} object.
      ReactClippingViewGroup clippingChild = (ReactClippingViewGroup) child;
      if (clippingChild.getRemoveClippedSubviews()) {
        clippingChild.updateClippingRect();
      }
    }
  }
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:39,代碼來源:ReactViewGroup.java

示例2: isRunning

import android.view.animation.Animation; //導入方法依賴的package包/類
@Override
public boolean isRunning() {
    final ArrayList<Animation> animators = mAnimators;
    final int N = animators.size();
    for (int i = 0; i < N; i++) {
        final Animation animator = animators.get(i);
        if (animator.hasStarted() && !animator.hasEnded()) {
            return true;
        }
    }
    return false;
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:13,代碼來源:MaterialProgressDrawable.java

示例3: isRunning

import android.view.animation.Animation; //導入方法依賴的package包/類
public boolean isRunning() {
    ArrayList<Animation> animators = this.mAnimators;
    int N = animators.size();
    for (int i = 0; i < N; i++) {
        Animation animator = (Animation) animators.get(i);
        if (animator.hasStarted() && !animator.hasEnded()) {
            return true;
        }
    }
    return false;
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:12,代碼來源:MaterialProgressDrawable.java

示例4: animating

import android.view.animation.Animation; //導入方法依賴的package包/類
/**
 * Returns true if a view is currently animating.
 */
private static boolean animating(View view) {
  Animation animation = view.getAnimation();
  return animation != null && !animation.hasEnded();
}
 
開發者ID:qq565999484,項目名稱:RNLearn_Project1,代碼行數:8,代碼來源:ClippingDrawCommandManager.java

示例5: isAnimationRunning

import android.view.animation.Animation; //導入方法依賴的package包/類
private boolean isAnimationRunning(Animation animation) {
    return animation != null && animation.hasStarted() && !animation.hasEnded();
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:4,代碼來源:SwipeRefreshLayout.java


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