当前位置: 首页>>代码示例>>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;未经允许,请勿转载。