Search in sources :

Example 1 with DismissView

use of com.android.systemui.statusbar.DismissView in project platform_frameworks_base by android.

the class StackScrollState method apply.

/**
     * Apply the properties saved in {@link #mStateMap} to the children of the {@link #mHostView}.
     * The properties are only applied if they effectively changed.
     */
public void apply() {
    int numChildren = mHostView.getChildCount();
    for (int i = 0; i < numChildren; i++) {
        ExpandableView child = (ExpandableView) mHostView.getChildAt(i);
        StackViewState state = mStateMap.get(child);
        if (!applyState(child, state)) {
            continue;
        }
        if (child instanceof DismissView) {
            DismissView dismissView = (DismissView) child;
            boolean visible = state.clipTopAmount < mClearAllTopPadding;
            dismissView.performVisibilityAnimation(visible && !dismissView.willBeGone());
        } else if (child instanceof EmptyShadeView) {
            EmptyShadeView emptyShadeView = (EmptyShadeView) child;
            boolean visible = state.clipTopAmount <= 0;
            emptyShadeView.performVisibilityAnimation(visible && !emptyShadeView.willBeGone());
        }
    }
}
Also used : EmptyShadeView(com.android.systemui.statusbar.EmptyShadeView) DismissView(com.android.systemui.statusbar.DismissView) ExpandableView(com.android.systemui.statusbar.ExpandableView)

Example 2 with DismissView

use of com.android.systemui.statusbar.DismissView in project android_frameworks_base by DirtyUnicorns.

the class StackScrollState method apply.

/**
     * Apply the properties saved in {@link #mStateMap} to the children of the {@link #mHostView}.
     * The properties are only applied if they effectively changed.
     */
public void apply() {
    int numChildren = mHostView.getChildCount();
    for (int i = 0; i < numChildren; i++) {
        ExpandableView child = (ExpandableView) mHostView.getChildAt(i);
        StackViewState state = mStateMap.get(child);
        if (!applyState(child, state)) {
            continue;
        }
        if (child instanceof DismissView) {
            DismissView dismissView = (DismissView) child;
            boolean visible = state.clipTopAmount < mClearAllTopPadding;
            dismissView.performVisibilityAnimation(visible && !dismissView.willBeGone());
        } else if (child instanceof EmptyShadeView) {
            EmptyShadeView emptyShadeView = (EmptyShadeView) child;
            boolean visible = state.clipTopAmount <= 0;
            emptyShadeView.performVisibilityAnimation(visible && !emptyShadeView.willBeGone());
        }
    }
}
Also used : EmptyShadeView(com.android.systemui.statusbar.EmptyShadeView) DismissView(com.android.systemui.statusbar.DismissView) ExpandableView(com.android.systemui.statusbar.ExpandableView)

Example 3 with DismissView

use of com.android.systemui.statusbar.DismissView in project android_frameworks_base by AOSPA.

the class StackScrollState method apply.

/**
     * Apply the properties saved in {@link #mStateMap} to the children of the {@link #mHostView}.
     * The properties are only applied if they effectively changed.
     */
public void apply() {
    int numChildren = mHostView.getChildCount();
    for (int i = 0; i < numChildren; i++) {
        ExpandableView child = (ExpandableView) mHostView.getChildAt(i);
        StackViewState state = mStateMap.get(child);
        if (!applyState(child, state)) {
            continue;
        }
        if (child instanceof DismissView) {
            DismissView dismissView = (DismissView) child;
            boolean visible = state.clipTopAmount < mClearAllTopPadding;
            dismissView.performVisibilityAnimation(visible && !dismissView.willBeGone());
        } else if (child instanceof EmptyShadeView) {
            EmptyShadeView emptyShadeView = (EmptyShadeView) child;
            boolean visible = state.clipTopAmount <= 0;
            emptyShadeView.performVisibilityAnimation(visible && !emptyShadeView.willBeGone());
        }
    }
}
Also used : EmptyShadeView(com.android.systemui.statusbar.EmptyShadeView) DismissView(com.android.systemui.statusbar.DismissView) ExpandableView(com.android.systemui.statusbar.ExpandableView)

Example 4 with DismissView

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

the class PhoneStatusBar method inflateDismissView.

private void inflateDismissView() {
    mDismissView = (DismissView) LayoutInflater.from(mContext).inflate(R.layout.status_bar_notification_dismiss_all, mStackScroller, false);
    mDismissView.setOnButtonClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            MetricsLogger.action(mContext, MetricsEvent.ACTION_DISMISS_ALL_NOTES);
            clearAllNotifications();
        }
    });
    mStackScroller.setDismissView(mDismissView);
}
Also used : OnClickListener(android.view.View.OnClickListener) ActivatableNotificationView(com.android.systemui.statusbar.ActivatableNotificationView) BatteryMeterView(com.android.systemui.BatteryMeterView) DismissView(com.android.systemui.statusbar.DismissView) NotificationBackgroundView(com.android.systemui.statusbar.NotificationBackgroundView) VisualizerView(com.android.systemui.statusbar.VisualizerView) SignalClusterView(com.android.systemui.statusbar.SignalClusterView) KeyguardStatusView(com.android.keyguard.KeyguardStatusView) ImageView(android.widget.ImageView) BatteryLevelTextView(com.android.systemui.BatteryLevelTextView) BackDropView(com.android.systemui.statusbar.BackDropView) KeyButtonView(com.android.systemui.statusbar.policy.KeyButtonView) EmptyShadeView(com.android.systemui.statusbar.EmptyShadeView) View(android.view.View) TextView(android.widget.TextView) ScrimView(com.android.systemui.statusbar.ScrimView)

Example 5 with DismissView

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

the class StackScrollState method apply.

/**
     * Apply the properties saved in {@link #mStateMap} to the children of the {@link #mHostView}.
     * The properties are only applied if they effectively changed.
     */
public void apply() {
    int numChildren = mHostView.getChildCount();
    for (int i = 0; i < numChildren; i++) {
        ExpandableView child = (ExpandableView) mHostView.getChildAt(i);
        StackViewState state = mStateMap.get(child);
        if (!applyState(child, state)) {
            continue;
        }
        if (child instanceof DismissView) {
            DismissView dismissView = (DismissView) child;
            boolean visible = state.clipTopAmount < mClearAllTopPadding;
            dismissView.performVisibilityAnimation(visible && !dismissView.willBeGone());
        } else if (child instanceof EmptyShadeView) {
            EmptyShadeView emptyShadeView = (EmptyShadeView) child;
            boolean visible = state.clipTopAmount <= 0;
            emptyShadeView.performVisibilityAnimation(visible && !emptyShadeView.willBeGone());
        }
    }
}
Also used : EmptyShadeView(com.android.systemui.statusbar.EmptyShadeView) DismissView(com.android.systemui.statusbar.DismissView) ExpandableView(com.android.systemui.statusbar.ExpandableView)

Aggregations

DismissView (com.android.systemui.statusbar.DismissView)6 EmptyShadeView (com.android.systemui.statusbar.EmptyShadeView)6 ExpandableView (com.android.systemui.statusbar.ExpandableView)5 View (android.view.View)1 OnClickListener (android.view.View.OnClickListener)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 KeyguardStatusView (com.android.keyguard.KeyguardStatusView)1 BatteryLevelTextView (com.android.systemui.BatteryLevelTextView)1 BatteryMeterView (com.android.systemui.BatteryMeterView)1 ActivatableNotificationView (com.android.systemui.statusbar.ActivatableNotificationView)1 BackDropView (com.android.systemui.statusbar.BackDropView)1 NotificationBackgroundView (com.android.systemui.statusbar.NotificationBackgroundView)1 ScrimView (com.android.systemui.statusbar.ScrimView)1 SignalClusterView (com.android.systemui.statusbar.SignalClusterView)1 VisualizerView (com.android.systemui.statusbar.VisualizerView)1 KeyButtonView (com.android.systemui.statusbar.policy.KeyButtonView)1