Lines Matching defs:child

260      * @param child the view to animate
263 public void animateTo(View child, AnimationProperties animationProperties) {
264 boolean wasVisible = child.getVisibility() == View.VISIBLE;
266 if (!wasVisible && (alpha != 0 || child.getAlpha() != 0)
268 child.setVisibility(View.VISIBLE);
270 float childAlpha = child.getAlpha();
272 if (child instanceof ExpandableView) {
274 alphaChanging &= !((ExpandableView) child).willBeGone();
278 if (child.getTranslationX() != this.xTranslation) {
279 startXTranslationAnimation(child, animationProperties);
281 abortAnimation(child, TAG_ANIMATOR_TRANSLATION_X);
285 if (child.getTranslationY() != this.yTranslation) {
286 startYTranslationAnimation(child, animationProperties);
288 abortAnimation(child, TAG_ANIMATOR_TRANSLATION_Y);
292 if (child.getTranslationZ() != this.zTranslation) {
293 startZTranslationAnimation(child, animationProperties);
295 abortAnimation(child, TAG_ANIMATOR_TRANSLATION_Z);
299 if (child.getScaleX() != scaleX) {
300 PropertyAnimator.startAnimation(child, SCALE_X_PROPERTY, scaleX, animationProperties);
302 abortAnimation(child, SCALE_X_PROPERTY.getAnimatorTag());
306 if (child.getScaleY() != scaleY) {
307 PropertyAnimator.startAnimation(child, SCALE_Y_PROPERTY, scaleY, animationProperties);
309 abortAnimation(child, SCALE_Y_PROPERTY.getAnimatorTag());
314 startAlphaAnimation(child, animationProperties);
316 abortAnimation(child, TAG_ANIMATOR_ALPHA);
324 private void startAlphaAnimation(final View child, AnimationProperties properties) {
325 Float previousStartValue = getChildTag(child,TAG_START_ALPHA);
326 Float previousEndValue = getChildTag(child,TAG_END_ALPHA);
331 ObjectAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_ALPHA);
342 child.setTag(TAG_START_ALPHA, newStartValue);
343 child.setTag(TAG_END_ALPHA, newEndValue);
348 child.setAlpha(newEndValue);
350 child.setVisibility(View.INVISIBLE);
355 ObjectAnimator animator = ObjectAnimator.ofFloat(child, View.ALPHA,
356 child.getAlpha(), newEndValue);
359 child.setLayerType(View.LAYER_TYPE_HARDWARE, null);
365 child.setLayerType(View.LAYER_TYPE_NONE, null);
367 child.setVisibility(View.INVISIBLE);
370 child.setTag(TAG_ANIMATOR_ALPHA, null);
371 child.setTag(TAG_START_ALPHA, null);
372 child.setTag(TAG_END_ALPHA, null);
397 child.setTag(TAG_ANIMATOR_ALPHA, animator);
398 child.setTag(TAG_START_ALPHA, child.getAlpha());
399 child.setTag(TAG_END_ALPHA, newEndValue);
411 private void startZTranslationAnimation(final View child, AnimationProperties properties) {
412 Float previousStartValue = getChildTag(child,TAG_START_TRANSLATION_Z);
413 Float previousEndValue = getChildTag(child,TAG_END_TRANSLATION_Z);
418 ObjectAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_TRANSLATION_Z);
429 child.setTag(TAG_START_TRANSLATION_Z, newStartValue);
430 child.setTag(TAG_END_TRANSLATION_Z, newEndValue);
435 child.setTranslationZ(newEndValue);
439 ObjectAnimator animator = ObjectAnimator.ofFloat(child, View.TRANSLATION_Z,
440 child.getTranslationZ(), newEndValue);
456 child.setTag(TAG_ANIMATOR_TRANSLATION_Z, null);
457 child.setTag(TAG_START_TRANSLATION_Z, null);
458 child.setTag(TAG_END_TRANSLATION_Z, null);
462 child.setTag(TAG_ANIMATOR_TRANSLATION_Z, animator);
463 child.setTag(TAG_START_TRANSLATION_Z, child.getTranslationZ());
464 child.setTag(TAG_END_TRANSLATION_Z, newEndValue);
471 private void startXTranslationAnimation(final View child, AnimationProperties properties) {
472 Float previousStartValue = getChildTag(child,TAG_START_TRANSLATION_X);
473 Float previousEndValue = getChildTag(child,TAG_END_TRANSLATION_X);
478 ObjectAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_TRANSLATION_X);
489 child.setTag(TAG_START_TRANSLATION_X, newStartValue);
490 child.setTag(TAG_END_TRANSLATION_X, newEndValue);
495 child.setTranslationX(newEndValue);
500 ObjectAnimator animator = ObjectAnimator.ofFloat(child, View.TRANSLATION_X,
501 child.getTranslationX(), newEndValue);
502 Interpolator customInterpolator = properties.getCustomInterpolator(child,
521 child.setTag(TAG_ANIMATOR_TRANSLATION_X, null);
522 child.setTag(TAG_START_TRANSLATION_X, null);
523 child.setTag(TAG_END_TRANSLATION_X, null);
527 child.setTag(TAG_ANIMATOR_TRANSLATION_X, animator);
528 child.setTag(TAG_START_TRANSLATION_X, child.getTranslationX());
529 child.setTag(TAG_END_TRANSLATION_X, newEndValue);
536 private void startYTranslationAnimation(final View child, AnimationProperties properties) {
537 Float previousStartValue = getChildTag(child,TAG_START_TRANSLATION_Y);
538 Float previousEndValue = getChildTag(child,TAG_END_TRANSLATION_Y);
543 ObjectAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_TRANSLATION_Y);
545 if (!filter.shouldAnimateY(child)) {
554 child.setTag(TAG_START_TRANSLATION_Y, newStartValue);
555 child.setTag(TAG_END_TRANSLATION_Y, newEndValue);
560 child.setTranslationY(newEndValue);
565 ObjectAnimator animator = ObjectAnimator.ofFloat(child, View.TRANSLATION_Y,
566 child.getTranslationY(), newEndValue);
567 Interpolator customInterpolator = properties.getCustomInterpolator(child,
586 HeadsUpManager.setIsClickedNotification(child, false);
587 child.setTag(TAG_ANIMATOR_TRANSLATION_Y, null);
588 child.setTag(TAG_START_TRANSLATION_Y, null);
589 child.setTag(TAG_END_TRANSLATION_Y, null);
590 onYTranslationAnimationFinished(child);
594 child.setTag(TAG_ANIMATOR_TRANSLATION_Y, animator);
595 child.setTag(TAG_START_TRANSLATION_Y, child.getTranslationY());
596 child.setTag(TAG_END_TRANSLATION_Y, newEndValue);
613 public static <T> T getChildTag(View child, int tag) {
614 return (T) child.getTag(tag);
617 protected void abortAnimation(View child, int animatorTag) {
618 Animator previousAnimator = getChildTag(child, animatorTag);
676 public static boolean isAnimatingY(View child) {
677 return getChildTag(child, TAG_ANIMATOR_TRANSLATION_Y) != null;