本文整理汇总了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();
}
}
}
}
示例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;
}
示例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;
}
示例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();
}
示例5: isAnimationRunning
import android.view.animation.Animation; //导入方法依赖的package包/类
private boolean isAnimationRunning(Animation animation) {
return animation != null && animation.hasStarted() && !animation.hasEnded();
}