Search in sources :

Example 81 with ExpandableView

use of com.android.systemui.statusbar.ExpandableView in project android_frameworks_base by crdroidandroid.

the class StackScrollAlgorithm method getNotificationChildrenStates.

private void getNotificationChildrenStates(StackScrollState resultState, StackScrollAlgorithmState algorithmState) {
    int childCount = algorithmState.visibleChildren.size();
    for (int i = 0; i < childCount; i++) {
        ExpandableView v = algorithmState.visibleChildren.get(i);
        if (v instanceof ExpandableNotificationRow) {
            ExpandableNotificationRow row = (ExpandableNotificationRow) v;
            row.getChildrenStates(resultState);
        }
    }
}
Also used : ExpandableView(com.android.systemui.statusbar.ExpandableView) ExpandableNotificationRow(com.android.systemui.statusbar.ExpandableNotificationRow)

Example 82 with ExpandableView

use of com.android.systemui.statusbar.ExpandableView in project android_frameworks_base by crdroidandroid.

the class NotificationStackScrollLayout method updateHideSensitiveForChild.

private void updateHideSensitiveForChild(View child) {
    if (child instanceof ExpandableView) {
        ExpandableView expandableView = (ExpandableView) child;
        expandableView.setHideSensitiveForIntrinsicHeight(mAmbientState.isHideSensitive());
    }
}
Also used : ExpandableView(com.android.systemui.statusbar.ExpandableView)

Example 83 with ExpandableView

use of com.android.systemui.statusbar.ExpandableView in project android_frameworks_base by crdroidandroid.

the class NotificationStackScrollLayout method getChildAtPosition.

@Override
public ExpandableView getChildAtPosition(float touchX, float touchY) {
    // find the view under the pointer, accounting for GONE views
    final int count = getChildCount();
    for (int childIdx = 0; childIdx < count; childIdx++) {
        ExpandableView slidingChild = (ExpandableView) getChildAt(childIdx);
        if (slidingChild.getVisibility() == GONE || slidingChild instanceof StackScrollerDecorView) {
            continue;
        }
        float childTop = slidingChild.getTranslationY();
        float top = childTop + slidingChild.getClipTopAmount();
        float bottom = childTop + slidingChild.getActualHeight();
        // Allow the full width of this view to prevent gesture conflict on Keyguard (phone and
        // camera affordance).
        int left = 0;
        int right = getWidth();
        if (touchY >= top && touchY <= bottom && touchX >= left && touchX <= right) {
            if (slidingChild instanceof ExpandableNotificationRow) {
                ExpandableNotificationRow row = (ExpandableNotificationRow) slidingChild;
                if (!mIsExpanded && row.isHeadsUp() && row.isPinned() && mHeadsUpManager.getTopEntry().entry.row != row && mGroupManager.getGroupSummary(mHeadsUpManager.getTopEntry().entry.row.getStatusBarNotification()) != row) {
                    continue;
                }
                return row.getViewAtPosition(touchY - childTop);
            }
            return slidingChild;
        }
    }
    return null;
}
Also used : StackScrollerDecorView(com.android.systemui.statusbar.StackScrollerDecorView) ExpandableView(com.android.systemui.statusbar.ExpandableView) Paint(android.graphics.Paint) ExpandableNotificationRow(com.android.systemui.statusbar.ExpandableNotificationRow)

Example 84 with ExpandableView

use of com.android.systemui.statusbar.ExpandableView in project android_frameworks_base by crdroidandroid.

the class NotificationStackScrollLayout method setHideSensitive.

public void setHideSensitive(boolean hideSensitive, boolean animate) {
    if (hideSensitive != mAmbientState.isHideSensitive()) {
        int childCount = getChildCount();
        for (int i = 0; i < childCount; i++) {
            ExpandableView v = (ExpandableView) getChildAt(i);
            v.setHideSensitiveForIntrinsicHeight(hideSensitive);
        }
        mAmbientState.setHideSensitive(hideSensitive);
        if (animate && mAnimationsEnabled) {
            mHideSensitiveNeedsAnimation = true;
            mNeedsAnimation = true;
        }
        mHideSensitiveChanged = true;
        requestChildrenUpdate();
    }
}
Also used : ExpandableView(com.android.systemui.statusbar.ExpandableView) Paint(android.graphics.Paint)

Example 85 with ExpandableView

use of com.android.systemui.statusbar.ExpandableView in project android_frameworks_base by crdroidandroid.

the class NotificationStackScrollLayout method getBottomMostNotificationBottom.

public float getBottomMostNotificationBottom() {
    final int count = getChildCount();
    float max = 0;
    for (int childIdx = 0; childIdx < count; childIdx++) {
        ExpandableView child = (ExpandableView) getChildAt(childIdx);
        if (child.getVisibility() == GONE) {
            continue;
        }
        float bottom = child.getTranslationY() + child.getActualHeight();
        if (bottom > max) {
            max = bottom;
        }
    }
    return max + getStackTranslation();
}
Also used : ExpandableView(com.android.systemui.statusbar.ExpandableView) Paint(android.graphics.Paint)

Aggregations

ExpandableView (com.android.systemui.statusbar.ExpandableView)172 Paint (android.graphics.Paint)92 ExpandableNotificationRow (com.android.systemui.statusbar.ExpandableNotificationRow)55 StackScrollerDecorView (com.android.systemui.statusbar.StackScrollerDecorView)15 DismissView (com.android.systemui.statusbar.DismissView)10 EmptyShadeView (com.android.systemui.statusbar.EmptyShadeView)10 View (android.view.View)5 ViewGroup (android.view.ViewGroup)5 ViewParent (android.view.ViewParent)5 ScrollView (android.widget.ScrollView)5 ActivatableNotificationView (com.android.systemui.statusbar.ActivatableNotificationView)5 FakeShadowView (com.android.systemui.statusbar.notification.FakeShadowView)5 ScrollContainer (com.android.systemui.statusbar.stack.ScrollContainer)5