Lines Matching refs:child

91     /** The current index for the last child which was not added in this event set. */
123 final ExpandableView child = (ExpandableView) mHostLayout.getChildAt(i);
125 StackViewState viewState = finalState.getViewStateForView(child);
126 if (viewState == null || child.getVisibility() == View.GONE
127 || applyWithoutAnimation(child, viewState, finalState)) {
131 startStackAnimations(child, viewState, finalState, i, -1 /* fixedDelay */);
134 // no child has preformed any animation, lets finish
148 private boolean applyWithoutAnimation(ExpandableView child, StackViewState viewState,
153 if (getChildTag(child, TAG_ANIMATOR_TRANSLATION_Y) != null) {
157 if (mHeadsUpDisappearChildren.contains(child) || mHeadsUpAppearChildren.contains(child)) {
161 if (NotificationStackScrollLayout.isPinnedHeadsUp(child)) {
165 finalState.applyState(child, viewState);
172 final ExpandableView child = (ExpandableView) mHostLayout.getChildAt(i);
174 StackViewState viewState = finalState.getViewStateForView(child);
175 if (viewState == null || child.getVisibility() == View.GONE) {
178 if (!mNewAddChildren.contains(child)) {
189 * @param child the child to start the animation on
196 public void startStackAnimations(final ExpandableView child, StackViewState viewState,
198 boolean wasAdded = mNewAddChildren.contains(child);
201 child.setTranslationY(child.getTranslationY() + mGoToFullShadeAppearingTranslation);
207 boolean yTranslationChanging = child.getTranslationY() != viewState.yTranslation;
208 boolean zTranslationChanging = child.getTranslationZ() != viewState.zTranslation;
209 boolean alphaChanging = viewState.alpha != child.getAlpha();
210 boolean heightChanging = viewState.height != child.getActualHeight();
211 boolean shadowAlphaChanging = viewState.shadowAlpha != child.getShadowAlpha();
212 boolean darkChanging = viewState.dark != child.isDark();
213 boolean topInsetChanging = viewState.clipTopAmount != child.getClipTopAmount();
224 startViewAnimations(child, viewState, delay, duration);
228 startHeightAnimation(child, viewState, duration, delay);
230 abortAnimation(child, TAG_ANIMATOR_HEIGHT);
235 startShadowAlphaAnimation(child, viewState, duration, delay);
237 abortAnimation(child, TAG_ANIMATOR_SHADOW_ALPHA);
242 startInsetAnimation(child, viewState, duration, delay);
244 abortAnimation(child, TAG_ANIMATOR_TOP_INSET);
248 child.setDimmed(viewState.dimmed, mAnimationFilter.animateDimmed);
251 child.setBelowSpeedBump(viewState.belowSpeedBump);
254 child.setHideSensitive(viewState.hideSensitive, mAnimationFilter.animateHideSensitive,
258 child.setDark(viewState.dark, mAnimationFilter.animateDark, delay);
261 child.performAddAnimation(delay, mCurrentLength);
263 if (child instanceof ExpandableNotificationRow) {
264 ExpandableNotificationRow row = (ExpandableNotificationRow) child;
272 * @param child the child to start the animation on
277 public void startViewAnimations(View child, ViewState viewState, long delay, long duration) {
278 boolean wasVisible = child.getVisibility() == View.VISIBLE;
280 if (!wasVisible && (alpha != 0 || child.getAlpha() != 0)
282 child.setVisibility(View.VISIBLE);
284 boolean yTranslationChanging = child.getTranslationY() != viewState.yTranslation;
285 boolean zTranslationChanging = child.getTranslationZ() != viewState.zTranslation;
286 float childAlpha = child.getAlpha();
288 if (child instanceof ExpandableView) {
290 alphaChanging &= !((ExpandableView) child).willBeGone();
295 startYTranslationAnimation(child, viewState, duration, delay);
297 abortAnimation(child, TAG_ANIMATOR_TRANSLATION_Y);
302 startZTranslationAnimation(child, viewState, duration, delay);
304 abortAnimation(child, TAG_ANIMATOR_TRANSLATION_Z);
308 if (alphaChanging && child.getTranslationX() == 0) {
309 startAlphaAnimation(child, viewState, duration, delay);
311 abortAnimation(child, TAG_ANIMATOR_ALPHA);
315 private void abortAnimation(View child, int animatorTag) {
316 Animator previousAnimator = getChildTag(child, animatorTag);
397 private void startShadowAlphaAnimation(final ExpandableView child,
399 Float previousStartValue = getChildTag(child, TAG_START_SHADOW_ALPHA);
400 Float previousEndValue = getChildTag(child, TAG_END_SHADOW_ALPHA);
405 ValueAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_SHADOW_ALPHA);
415 child.setTag(TAG_START_SHADOW_ALPHA, newStartValue);
416 child.setTag(TAG_END_SHADOW_ALPHA, newEndValue);
421 child.setShadowAlpha(newEndValue);
426 ValueAnimator animator = ValueAnimator.ofFloat(child.getShadowAlpha(), newEndValue);
430 child.setShadowAlpha((float) animation.getAnimatedValue());
445 child.setTag(TAG_ANIMATOR_SHADOW_ALPHA, null);
446 child.setTag(TAG_START_SHADOW_ALPHA, null);
447 child.setTag(TAG_END_SHADOW_ALPHA, null);
451 child.setTag(TAG_ANIMATOR_SHADOW_ALPHA, animator);
452 child.setTag(TAG_START_SHADOW_ALPHA, child.getShadowAlpha());
453 child.setTag(TAG_END_SHADOW_ALPHA, newEndValue);
456 private void startHeightAnimation(final ExpandableView child,
458 Integer previousStartValue = getChildTag(child, TAG_START_HEIGHT);
459 Integer previousEndValue = getChildTag(child, TAG_END_HEIGHT);
464 ValueAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_HEIGHT);
474 child.setTag(TAG_START_HEIGHT, newStartValue);
475 child.setTag(TAG_END_HEIGHT, newEndValue);
480 child.setActualHeight(newEndValue, false);
485 ValueAnimator animator = ValueAnimator.ofInt(child.getActualHeight(), newEndValue);
489 child.setActualHeight((int) animation.getAnimatedValue(),
507 child.setTag(TAG_ANIMATOR_HEIGHT, null);
508 child.setTag(TAG_START_HEIGHT, null);
509 child.setTag(TAG_END_HEIGHT, null);
510 child.setActualHeightAnimating(false);
511 if (!mWasCancelled && child instanceof ExpandableNotificationRow) {
512 ((ExpandableNotificationRow) child).setGroupExpansionChanging(
528 child.setTag(TAG_ANIMATOR_HEIGHT, animator);
529 child.setTag(TAG_START_HEIGHT, child.getActualHeight());
530 child.setTag(TAG_END_HEIGHT, newEndValue);
531 child.setActualHeightAnimating(true);
534 private void startInsetAnimation(final ExpandableView child,
536 Integer previousStartValue = getChildTag(child, TAG_START_TOP_INSET);
537 Integer previousEndValue = getChildTag(child, TAG_END_TOP_INSET);
542 ValueAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_TOP_INSET);
552 child.setTag(TAG_START_TOP_INSET, newStartValue);
553 child.setTag(TAG_END_TOP_INSET, newEndValue);
558 child.setClipTopAmount(newEndValue);
563 ValueAnimator animator = ValueAnimator.ofInt(child.getClipTopAmount(), newEndValue);
567 child.setClipTopAmount((int) animation.getAnimatedValue());
582 child.setTag(TAG_ANIMATOR_TOP_INSET, null);
583 child.setTag(TAG_START_TOP_INSET, null);
584 child.setTag(TAG_END_TOP_INSET, null);
588 child.setTag(TAG_ANIMATOR_TOP_INSET, animator);
589 child.setTag(TAG_START_TOP_INSET, child.getClipTopAmount());
590 child.setTag(TAG_END_TOP_INSET, newEndValue);
593 private void startAlphaAnimation(final View child,
595 Float previousStartValue = getChildTag(child,TAG_START_ALPHA);
596 Float previousEndValue = getChildTag(child,TAG_END_ALPHA);
601 ObjectAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_ALPHA);
611 child.setTag(TAG_START_ALPHA, newStartValue);
612 child.setTag(TAG_END_ALPHA, newEndValue);
617 child.setAlpha(newEndValue);
619 child.setVisibility(View.INVISIBLE);
624 ObjectAnimator animator = ObjectAnimator.ofFloat(child, View.ALPHA,
625 child.getAlpha(), newEndValue);
628 child.setLayerType(View.LAYER_TYPE_HARDWARE, null);
634 child.setLayerType(View.LAYER_TYPE_NONE, null);
636 child.setVisibility(View.INVISIBLE);
639 child.setTag(TAG_ANIMATOR_ALPHA, null);
640 child.setTag(TAG_START_ALPHA, null);
641 child.setTag(TAG_END_ALPHA, null);
663 child.setTag(TAG_ANIMATOR_ALPHA, animator);
664 child.setTag(TAG_START_ALPHA, child.getAlpha());
665 child.setTag(TAG_END_ALPHA, newEndValue);
668 private void startZTranslationAnimation(final View child,
670 Float previousStartValue = getChildTag(child,TAG_START_TRANSLATION_Z);
671 Float previousEndValue = getChildTag(child,TAG_END_TRANSLATION_Z);
676 ObjectAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_TRANSLATION_Z);
686 child.setTag(TAG_START_TRANSLATION_Z, newStartValue);
687 child.setTag(TAG_END_TRANSLATION_Z, newEndValue);
692 child.setTranslationZ(newEndValue);
696 ObjectAnimator animator = ObjectAnimator.ofFloat(child, View.TRANSLATION_Z,
697 child.getTranslationZ(), newEndValue);
710 child.setTag(TAG_ANIMATOR_TRANSLATION_Z, null);
711 child.setTag(TAG_START_TRANSLATION_Z, null);
712 child.setTag(TAG_END_TRANSLATION_Z, null);
716 child.setTag(TAG_ANIMATOR_TRANSLATION_Z, animator);
717 child.setTag(TAG_START_TRANSLATION_Z, child.getTranslationZ());
718 child.setTag(TAG_END_TRANSLATION_Z, newEndValue);
721 private void startYTranslationAnimation(final View child,
723 Float previousStartValue = getChildTag(child,TAG_START_TRANSLATION_Y);
724 Float previousEndValue = getChildTag(child,TAG_END_TRANSLATION_Y);
729 ObjectAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_TRANSLATION_Y);
739 child.setTag(TAG_START_TRANSLATION_Y, newStartValue);
740 child.setTag(TAG_END_TRANSLATION_Y, newEndValue);
745 child.setTranslationY(newEndValue);
750 ObjectAnimator animator = ObjectAnimator.ofFloat(child, View.TRANSLATION_Y,
751 child.getTranslationY(), newEndValue);
752 Interpolator interpolator = mHeadsUpAppearChildren.contains(child) ?
762 final boolean isHeadsUpDisappear = mHeadsUpDisappearChildren.contains(child);
767 HeadsUpManager.setIsClickedNotification(child, false);
768 child.setTag(TAG_ANIMATOR_TRANSLATION_Y, null);
769 child.setTag(TAG_START_TRANSLATION_Y, null);
770 child.setTag(TAG_END_TRANSLATION_Y, null);
772 ((ExpandableNotificationRow) child).setHeadsupDisappearRunning(false);
777 child.setTag(TAG_ANIMATOR_TRANSLATION_Y, animator);
778 child.setTag(TAG_START_TRANSLATION_Y, child.getTranslationY());
779 child.setTag(TAG_END_TRANSLATION_Y, newEndValue);
821 public static <T> T getChildTag(View child, int tag) {
822 return (T) child.getTag(tag);
870 // The position for this child was never generated, let's continue.
891 // there was a view after this one, Approximate the distance the next child