Search in sources :

Example 1 with EmptyShadeView

use of com.android.systemui.statusbar.EmptyShadeView 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 EmptyShadeView

use of com.android.systemui.statusbar.EmptyShadeView 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 EmptyShadeView

use of com.android.systemui.statusbar.EmptyShadeView 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 EmptyShadeView

use of com.android.systemui.statusbar.EmptyShadeView 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)

Example 5 with EmptyShadeView

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

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)5 EmptyShadeView (com.android.systemui.statusbar.EmptyShadeView)5 ExpandableView (com.android.systemui.statusbar.ExpandableView)5