Search in sources :

Example 41 with ExpandableNotificationRow

use of com.android.systemui.statusbar.ExpandableNotificationRow in project android_frameworks_base by ResurrectionRemix.

the class TransformState method setClippingDeactivated.

public static void setClippingDeactivated(final View transformedView, boolean deactivated) {
    if (!(transformedView.getParent() instanceof ViewGroup)) {
        return;
    }
    ViewGroup view = (ViewGroup) transformedView.getParent();
    while (true) {
        ArraySet<View> clipSet = (ArraySet<View>) view.getTag(CLIP_CLIPPING_SET);
        if (clipSet == null) {
            clipSet = new ArraySet<>();
            view.setTag(CLIP_CLIPPING_SET, clipSet);
        }
        Boolean clipChildren = (Boolean) view.getTag(CLIP_CHILDREN_TAG);
        if (clipChildren == null) {
            clipChildren = view.getClipChildren();
            view.setTag(CLIP_CHILDREN_TAG, clipChildren);
        }
        Boolean clipToPadding = (Boolean) view.getTag(CLIP_TO_PADDING);
        if (clipToPadding == null) {
            clipToPadding = view.getClipToPadding();
            view.setTag(CLIP_TO_PADDING, clipToPadding);
        }
        ExpandableNotificationRow row = view instanceof ExpandableNotificationRow ? (ExpandableNotificationRow) view : null;
        if (!deactivated) {
            clipSet.remove(transformedView);
            if (clipSet.isEmpty()) {
                view.setClipChildren(clipChildren);
                view.setClipToPadding(clipToPadding);
                view.setTag(CLIP_CLIPPING_SET, null);
                if (row != null) {
                    row.setClipToActualHeight(true);
                }
            }
        } else {
            clipSet.add(transformedView);
            view.setClipChildren(false);
            view.setClipToPadding(false);
            if (row != null && row.isChildInGroup()) {
                // We still want to clip to the parent's height
                row.setClipToActualHeight(false);
            }
        }
        if (row != null && !row.isChildInGroup()) {
            return;
        }
        final ViewParent parent = view.getParent();
        if (parent instanceof ViewGroup) {
            view = (ViewGroup) parent;
        } else {
            return;
        }
    }
}
Also used : ArraySet(android.util.ArraySet) ViewGroup(android.view.ViewGroup) ViewParent(android.view.ViewParent) ImageView(android.widget.ImageView) TransformableView(com.android.systemui.statusbar.TransformableView) TextView(android.widget.TextView) View(android.view.View) NotificationHeaderView(android.view.NotificationHeaderView) ExpandableNotificationRow(com.android.systemui.statusbar.ExpandableNotificationRow)

Example 42 with ExpandableNotificationRow

use of com.android.systemui.statusbar.ExpandableNotificationRow in project android_frameworks_base by ResurrectionRemix.

the class NotificationStackScrollLayout method updateAnimationState.

private void updateAnimationState(boolean running, View child) {
    if (child instanceof ExpandableNotificationRow) {
        ExpandableNotificationRow row = (ExpandableNotificationRow) child;
        row.setIconAnimationRunning(running);
    }
}
Also used : ExpandableNotificationRow(com.android.systemui.statusbar.ExpandableNotificationRow)

Example 43 with ExpandableNotificationRow

use of com.android.systemui.statusbar.ExpandableNotificationRow in project android_frameworks_base by ResurrectionRemix.

the class NotificationChildrenContainer method setChildrenExpanded.

public void setChildrenExpanded(boolean childrenExpanded) {
    mChildrenExpanded = childrenExpanded;
    updateExpansionStates();
    if (mNotificationHeader != null) {
        mNotificationHeader.setExpanded(childrenExpanded);
    }
    final int count = mChildren.size();
    for (int childIdx = 0; childIdx < count; childIdx++) {
        ExpandableNotificationRow child = mChildren.get(childIdx);
        child.setChildrenExpanded(childrenExpanded, false);
    }
}
Also used : ExpandableNotificationRow(com.android.systemui.statusbar.ExpandableNotificationRow)

Example 44 with ExpandableNotificationRow

use of com.android.systemui.statusbar.ExpandableNotificationRow in project android_frameworks_base by ResurrectionRemix.

the class NotificationChildrenContainer method getVisibleChildrenExpandHeight.

private int getVisibleChildrenExpandHeight() {
    int intrinsicHeight = mNotificationHeaderMargin + mNotificatonTopPadding + mDividerHeight;
    int visibleChildren = 0;
    int childCount = mChildren.size();
    int maxAllowedVisibleChildren = getMaxAllowedVisibleChildren(true);
    for (int i = 0; i < childCount; i++) {
        if (visibleChildren >= maxAllowedVisibleChildren) {
            break;
        }
        ExpandableNotificationRow child = mChildren.get(i);
        float childHeight = child.isExpanded(true) ? child.getMaxExpandHeight() : child.getShowingLayout().getMinHeight(true);
        intrinsicHeight += childHeight;
        visibleChildren++;
    }
    return intrinsicHeight;
}
Also used : ExpandableNotificationRow(com.android.systemui.statusbar.ExpandableNotificationRow)

Example 45 with ExpandableNotificationRow

use of com.android.systemui.statusbar.ExpandableNotificationRow in project android_frameworks_base by ResurrectionRemix.

the class NotificationChildrenContainer method applyState.

public void applyState(StackScrollState state) {
    int childCount = mChildren.size();
    ViewState tmpState = new ViewState();
    float expandFraction = 0.0f;
    if (mUserLocked) {
        expandFraction = getGroupExpandFraction();
    }
    final boolean dividersVisible = mUserLocked || mNotificationParent.isGroupExpansionChanging();
    for (int i = 0; i < childCount; i++) {
        ExpandableNotificationRow child = mChildren.get(i);
        StackViewState viewState = state.getViewStateForView(child);
        state.applyState(child, viewState);
        // layout the divider
        View divider = mDividers.get(i);
        tmpState.initFrom(divider);
        tmpState.yTranslation = viewState.yTranslation - mDividerHeight;
        float alpha = mChildrenExpanded && viewState.alpha != 0 ? 0.5f : 0;
        if (mUserLocked && viewState.alpha != 0) {
            alpha = NotificationUtils.interpolate(0, 0.5f, Math.min(viewState.alpha, expandFraction));
        }
        tmpState.hidden = !dividersVisible;
        tmpState.alpha = alpha;
        state.applyViewState(divider, tmpState);
        // There is no fake shadow to be drawn on the children
        child.setFakeShadowIntensity(0.0f, 0.0f, 0, 0);
    }
    if (mOverflowNumber != null) {
        state.applyViewState(mOverflowNumber, mGroupOverFlowState);
        mNeverAppliedGroupState = false;
    }
    if (mNotificationHeader != null) {
        state.applyViewState(mNotificationHeader, mHeaderViewState);
    }
}
Also used : View(android.view.View) HybridNotificationView(com.android.systemui.statusbar.notification.HybridNotificationView) TextView(android.widget.TextView) NotificationPanelView(com.android.systemui.statusbar.phone.NotificationPanelView) NotificationHeaderView(android.view.NotificationHeaderView) ExpandableNotificationRow(com.android.systemui.statusbar.ExpandableNotificationRow)

Aggregations

ExpandableNotificationRow (com.android.systemui.statusbar.ExpandableNotificationRow)290 View (android.view.View)75 ExpandableView (com.android.systemui.statusbar.ExpandableView)75 TextView (android.widget.TextView)55 ActivatableNotificationView (com.android.systemui.statusbar.ActivatableNotificationView)45 DismissView (com.android.systemui.statusbar.DismissView)45 EmptyShadeView (com.android.systemui.statusbar.EmptyShadeView)45 Paint (android.graphics.Paint)40 ImageView (android.widget.ImageView)35 Point (android.graphics.Point)30 BatteryMeterView (com.android.systemui.BatteryMeterView)30 BackDropView (com.android.systemui.statusbar.BackDropView)30 ScrimView (com.android.systemui.statusbar.ScrimView)30 SignalClusterView (com.android.systemui.statusbar.SignalClusterView)30 NotificationHeaderView (android.view.NotificationHeaderView)25 BatteryLevelTextView (com.android.systemui.BatteryLevelTextView)24 KeyButtonView (com.android.systemui.statusbar.policy.KeyButtonView)24 StackScrollerDecorView (com.android.systemui.statusbar.StackScrollerDecorView)20 FakeShadowView (com.android.systemui.statusbar.notification.FakeShadowView)20 HybridNotificationView (com.android.systemui.statusbar.notification.HybridNotificationView)20