Search in sources :

Example 66 with ExpandableView

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

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)

Example 67 with ExpandableView

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

the class ExpandHelper method findView.

private ExpandableView findView(float x, float y) {
    ExpandableView v;
    if (mEventSource != null) {
        int[] location = new int[2];
        mEventSource.getLocationOnScreen(location);
        x += location[0];
        y += location[1];
        v = mCallback.getChildAtRawPosition(x, y);
    } else {
        v = mCallback.getChildAtPosition(x, y);
    }
    return v;
}
Also used : ExpandableView(com.android.systemui.statusbar.ExpandableView)

Example 68 with ExpandableView

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

the class ExpandHelper method findView.

private ExpandableView findView(float x, float y) {
    ExpandableView v;
    if (mEventSource != null) {
        int[] location = new int[2];
        mEventSource.getLocationOnScreen(location);
        x += location[0];
        y += location[1];
        v = mCallback.getChildAtRawPosition(x, y);
    } else {
        v = mCallback.getChildAtPosition(x, y);
    }
    return v;
}
Also used : ExpandableView(com.android.systemui.statusbar.ExpandableView)

Example 69 with ExpandableView

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

the class NotificationStackScrollLayout method changeViewPosition.

/**
     * Change the position of child to a new location
     *
     * @param child the view to change the position for
     * @param newIndex the new index
     */
public void changeViewPosition(View child, int newIndex) {
    int currentIndex = indexOfChild(child);
    if (child != null && child.getParent() == this && currentIndex != newIndex) {
        mChangePositionInProgress = true;
        ((ExpandableView) child).setChangingPosition(true);
        removeView(child);
        addView(child, newIndex);
        ((ExpandableView) child).setChangingPosition(false);
        mChangePositionInProgress = false;
        if (mIsExpanded && mAnimationsEnabled && child.getVisibility() != View.GONE) {
            mChildrenChangingPositions.add(child);
            mNeedsAnimation = true;
        }
    }
}
Also used : ExpandableView(com.android.systemui.statusbar.ExpandableView) Paint(android.graphics.Paint)

Example 70 with ExpandableView

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

the class RemoteInputView method findScrollContainer.

private void findScrollContainer() {
    if (mScrollContainer == null) {
        mScrollContainerChild = null;
        ViewParent p = this;
        while (p != null) {
            if (mScrollContainerChild == null && p instanceof ExpandableView) {
                mScrollContainerChild = (View) p;
            }
            if (p.getParent() instanceof ScrollContainer) {
                mScrollContainer = (ScrollContainer) p.getParent();
                if (mScrollContainerChild == null) {
                    mScrollContainerChild = (View) p;
                }
                break;
            }
            p = p.getParent();
        }
    }
}
Also used : ViewParent(android.view.ViewParent) ScrollContainer(com.android.systemui.statusbar.stack.ScrollContainer) ExpandableView(com.android.systemui.statusbar.ExpandableView)

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