Lines Matching refs:child

90     /** The current index for the last child which was not added in this event set. */
122 final ExpandableView child = (ExpandableView) mHostLayout.getChildAt(i);
124 StackViewState viewState = finalState.getViewStateForView(child);
125 if (viewState == null || child.getVisibility() == View.GONE
126 || applyWithoutAnimation(child, viewState, finalState)) {
130 startStackAnimations(child, viewState, finalState, i, -1 /* fixedDelay */);
133 // no child has preformed any animation, lets finish
147 private boolean applyWithoutAnimation(ExpandableView child, StackViewState viewState,
152 if (getChildTag(child, TAG_ANIMATOR_TRANSLATION_Y) != null) {
156 if (mHeadsUpDisappearChildren.contains(child) || mHeadsUpAppearChildren.contains(child)) {
160 if (NotificationStackScrollLayout.isPinnedHeadsUp(child)) {
164 finalState.applyState(child, viewState);
171 final ExpandableView child = (ExpandableView) mHostLayout.getChildAt(i);
173 StackViewState viewState = finalState.getViewStateForView(child);
174 if (viewState == null || child.getVisibility() == View.GONE) {
177 if (!mNewAddChildren.contains(child)) {
188 * @param child the child to start the animation on
195 public void startStackAnimations(final ExpandableView child, StackViewState viewState,
197 boolean wasAdded = mNewAddChildren.contains(child);
200 child.setTranslationY(child.getTranslationY() + mGoToFullShadeAppearingTranslation);
206 boolean yTranslationChanging = child.getTranslationY() != viewState.yTranslation;
207 boolean zTranslationChanging = child.getTranslationZ() != viewState.zTranslation;
208 boolean alphaChanging = viewState.alpha != child.getAlpha();
209 boolean heightChanging = viewState.height != child.getActualHeight();
210 boolean shadowAlphaChanging = viewState.shadowAlpha != child.getShadowAlpha();
211 boolean darkChanging = viewState.dark != child.isDark();
212 boolean topInsetChanging = viewState.clipTopAmount != child.getClipTopAmount();
223 startViewAnimations(child, viewState, delay, duration);
227 startHeightAnimation(child, viewState, duration, delay);
229 abortAnimation(child, TAG_ANIMATOR_HEIGHT);
234 startShadowAlphaAnimation(child, viewState, duration, delay);
236 abortAnimation(child, TAG_ANIMATOR_SHADOW_ALPHA);
241 startInsetAnimation(child, viewState, duration, delay);
243 abortAnimation(child, TAG_ANIMATOR_TOP_INSET);
247 child.setDimmed(viewState.dimmed, mAnimationFilter.animateDimmed);
250 child.setBelowSpeedBump(viewState.belowSpeedBump);
253 child.setHideSensitive(viewState.hideSensitive, mAnimationFilter.animateHideSensitive,
257 child.setDark(viewState.dark, mAnimationFilter.animateDark, delay);
260 child.performAddAnimation(delay, mCurrentLength);
262 if (child instanceof ExpandableNotificationRow) {
263 ExpandableNotificationRow row = (ExpandableNotificationRow) child;
271 * @param child the child to start the animation on
276 public void startViewAnimations(View child, ViewState viewState, long delay, long duration) {
277 boolean wasVisible = child.getVisibility() == View.VISIBLE;
279 if (!wasVisible && (alpha != 0 || child.getAlpha() != 0)
281 child.setVisibility(View.VISIBLE);
283 boolean yTranslationChanging = child.getTranslationY() != viewState.yTranslation;
284 boolean zTranslationChanging = child.getTranslationZ() != viewState.zTranslation;
285 float childAlpha = child.getAlpha();
287 if (child instanceof ExpandableView) {
289 alphaChanging &= !((ExpandableView) child).willBeGone();
294 startYTranslationAnimation(child, viewState, duration, delay);
296 abortAnimation(child, TAG_ANIMATOR_TRANSLATION_Y);
301 startZTranslationAnimation(child, viewState, duration, delay);
303 abortAnimation(child, TAG_ANIMATOR_TRANSLATION_Z);
307 if (alphaChanging && child.getTranslationX() == 0) {
308 startAlphaAnimation(child, viewState, duration, delay);
310 abortAnimation(child, TAG_ANIMATOR_ALPHA);
314 private void abortAnimation(View child, int animatorTag) {
315 Animator previousAnimator = getChildTag(child, animatorTag);
396 private void startShadowAlphaAnimation(final ExpandableView child,
398 Float previousStartValue = getChildTag(child, TAG_START_SHADOW_ALPHA);
399 Float previousEndValue = getChildTag(child, TAG_END_SHADOW_ALPHA);
404 ValueAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_SHADOW_ALPHA);
414 child.setTag(TAG_START_SHADOW_ALPHA, newStartValue);
415 child.setTag(TAG_END_SHADOW_ALPHA, newEndValue);
420 child.setShadowAlpha(newEndValue);
425 ValueAnimator animator = ValueAnimator.ofFloat(child.getShadowAlpha(), newEndValue);
429 child.setShadowAlpha((float) animation.getAnimatedValue());
444 child.setTag(TAG_ANIMATOR_SHADOW_ALPHA, null);
445 child.setTag(TAG_START_SHADOW_ALPHA, null);
446 child.setTag(TAG_END_SHADOW_ALPHA, null);
450 child.setTag(TAG_ANIMATOR_SHADOW_ALPHA, animator);
451 child.setTag(TAG_START_SHADOW_ALPHA, child.getShadowAlpha());
452 child.setTag(TAG_END_SHADOW_ALPHA, newEndValue);
455 private void startHeightAnimation(final ExpandableView child,
457 Integer previousStartValue = getChildTag(child, TAG_START_HEIGHT);
458 Integer previousEndValue = getChildTag(child, TAG_END_HEIGHT);
463 ValueAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_HEIGHT);
473 child.setTag(TAG_START_HEIGHT, newStartValue);
474 child.setTag(TAG_END_HEIGHT, newEndValue);
479 child.setActualHeight(newEndValue, false);
484 ValueAnimator animator = ValueAnimator.ofInt(child.getActualHeight(), newEndValue);
488 child.setActualHeight((int) animation.getAnimatedValue(),
506 child.setTag(TAG_ANIMATOR_HEIGHT, null);
507 child.setTag(TAG_START_HEIGHT, null);
508 child.setTag(TAG_END_HEIGHT, null);
509 child.setActualHeightAnimating(false);
510 if (!mWasCancelled && child instanceof ExpandableNotificationRow) {
511 ((ExpandableNotificationRow) child).setGroupExpansionChanging(
527 child.setTag(TAG_ANIMATOR_HEIGHT, animator);
528 child.setTag(TAG_START_HEIGHT, child.getActualHeight());
529 child.setTag(TAG_END_HEIGHT, newEndValue);
530 child.setActualHeightAnimating(true);
533 private void startInsetAnimation(final ExpandableView child,
535 Integer previousStartValue = getChildTag(child, TAG_START_TOP_INSET);
536 Integer previousEndValue = getChildTag(child, TAG_END_TOP_INSET);
541 ValueAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_TOP_INSET);
551 child.setTag(TAG_START_TOP_INSET, newStartValue);
552 child.setTag(TAG_END_TOP_INSET, newEndValue);
557 child.setClipTopAmount(newEndValue);
562 ValueAnimator animator = ValueAnimator.ofInt(child.getClipTopAmount(), newEndValue);
566 child.setClipTopAmount((int) animation.getAnimatedValue());
581 child.setTag(TAG_ANIMATOR_TOP_INSET, null);
582 child.setTag(TAG_START_TOP_INSET, null);
583 child.setTag(TAG_END_TOP_INSET, null);
587 child.setTag(TAG_ANIMATOR_TOP_INSET, animator);
588 child.setTag(TAG_START_TOP_INSET, child.getClipTopAmount());
589 child.setTag(TAG_END_TOP_INSET, newEndValue);
592 private void startAlphaAnimation(final View child,
594 Float previousStartValue = getChildTag(child,TAG_START_ALPHA);
595 Float previousEndValue = getChildTag(child,TAG_END_ALPHA);
600 ObjectAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_ALPHA);
610 child.setTag(TAG_START_ALPHA, newStartValue);
611 child.setTag(TAG_END_ALPHA, newEndValue);
616 child.setAlpha(newEndValue);
618 child.setVisibility(View.INVISIBLE);
623 ObjectAnimator animator = ObjectAnimator.ofFloat(child, View.ALPHA,
624 child.getAlpha(), newEndValue);
627 child.setLayerType(View.LAYER_TYPE_HARDWARE, null);
633 child.setLayerType(View.LAYER_TYPE_NONE, null);
635 child.setVisibility(View.INVISIBLE);
638 child.setTag(TAG_ANIMATOR_ALPHA, null);
639 child.setTag(TAG_START_ALPHA, null);
640 child.setTag(TAG_END_ALPHA, null);
662 child.setTag(TAG_ANIMATOR_ALPHA, animator);
663 child.setTag(TAG_START_ALPHA, child.getAlpha());
664 child.setTag(TAG_END_ALPHA, newEndValue);
667 private void startZTranslationAnimation(final View child,
669 Float previousStartValue = getChildTag(child,TAG_START_TRANSLATION_Z);
670 Float previousEndValue = getChildTag(child,TAG_END_TRANSLATION_Z);
675 ObjectAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_TRANSLATION_Z);
685 child.setTag(TAG_START_TRANSLATION_Z, newStartValue);
686 child.setTag(TAG_END_TRANSLATION_Z, newEndValue);
691 child.setTranslationZ(newEndValue);
695 ObjectAnimator animator = ObjectAnimator.ofFloat(child, View.TRANSLATION_Z,
696 child.getTranslationZ(), newEndValue);
709 child.setTag(TAG_ANIMATOR_TRANSLATION_Z, null);
710 child.setTag(TAG_START_TRANSLATION_Z, null);
711 child.setTag(TAG_END_TRANSLATION_Z, null);
715 child.setTag(TAG_ANIMATOR_TRANSLATION_Z, animator);
716 child.setTag(TAG_START_TRANSLATION_Z, child.getTranslationZ());
717 child.setTag(TAG_END_TRANSLATION_Z, newEndValue);
720 private void startYTranslationAnimation(final View child,
722 Float previousStartValue = getChildTag(child,TAG_START_TRANSLATION_Y);
723 Float previousEndValue = getChildTag(child,TAG_END_TRANSLATION_Y);
728 ObjectAnimator previousAnimator = getChildTag(child, TAG_ANIMATOR_TRANSLATION_Y);
738 child.setTag(TAG_START_TRANSLATION_Y, newStartValue);
739 child.setTag(TAG_END_TRANSLATION_Y, newEndValue);
744 child.setTranslationY(newEndValue);
749 ObjectAnimator animator = ObjectAnimator.ofFloat(child, View.TRANSLATION_Y,
750 child.getTranslationY(), newEndValue);
751 Interpolator interpolator = mHeadsUpAppearChildren.contains(child) ?
761 final boolean isHeadsUpDisappear = mHeadsUpDisappearChildren.contains(child);
766 HeadsUpManager.setIsClickedNotification(child, false);
767 child.setTag(TAG_ANIMATOR_TRANSLATION_Y, null);
768 child.setTag(TAG_START_TRANSLATION_Y, null);
769 child.setTag(TAG_END_TRANSLATION_Y, null);
771 ((ExpandableNotificationRow) child).setHeadsupDisappearRunning(false);
776 child.setTag(TAG_ANIMATOR_TRANSLATION_Y, animator);
777 child.setTag(TAG_START_TRANSLATION_Y, child.getTranslationY());
778 child.setTag(TAG_END_TRANSLATION_Y, newEndValue);
820 public static <T> T getChildTag(View child, int tag) {
821 return (T) child.getTag(tag);
869 // The position for this child was never generated, let's continue.
890 // there was a view after this one, Approximate the distance the next child