FileDocCategorySizeDatePackage
NotificationsQuickSettingsContainer.javaAPI DocAndroid 5.1 API3743Thu Mar 12 22:22:42 GMT 2015com.android.systemui.statusbar.phone

NotificationsQuickSettingsContainer

public class NotificationsQuickSettingsContainer extends android.widget.FrameLayout implements ViewStub.OnInflateListener
The container with notification stack scroller and quick settings inside.

Fields Summary
private android.view.View
mScrollView
private android.view.View
mUserSwitcher
private android.view.View
mStackScroller
private android.view.View
mKeyguardStatusBar
private boolean
mInflated
Constructors Summary
public NotificationsQuickSettingsContainer(android.content.Context context, android.util.AttributeSet attrs)

        super(context, attrs);
    
Methods Summary
protected booleandrawChild(android.graphics.Canvas canvas, android.view.View child, long drawingTime)

        boolean userSwitcherVisible = mInflated && mUserSwitcher.getVisibility() == View.VISIBLE;
        boolean statusBarVisible = mKeyguardStatusBar.getVisibility() == View.VISIBLE;

        // Invert the order of the scroll view and user switcher such that the notifications receive
        // touches first but the panel gets drawn above.
        if (child == mScrollView) {
            return super.drawChild(canvas, mStackScroller, drawingTime);
        } else if (child == mStackScroller) {
            return super.drawChild(canvas,
                    userSwitcherVisible && statusBarVisible ? mUserSwitcher
                    : statusBarVisible ? mKeyguardStatusBar
                    : userSwitcherVisible ? mUserSwitcher
                    : mScrollView,
                    drawingTime);
        } else if (child == mUserSwitcher) {
            return super.drawChild(canvas,
                    userSwitcherVisible && statusBarVisible ? mKeyguardStatusBar
                    : mScrollView,
                    drawingTime);
        } else if (child == mKeyguardStatusBar) {
            return super.drawChild(canvas,
                    userSwitcherVisible && statusBarVisible ? mScrollView
                    : mScrollView,
                    drawingTime);
        }else {
            return super.drawChild(canvas, child, drawingTime);
        }
    
public android.view.WindowInsetsonApplyWindowInsets(android.view.WindowInsets insets)

        setPadding(0, 0, 0, insets.getSystemWindowInsetBottom());
        return insets;
    
protected voidonFinishInflate()

        super.onFinishInflate();
        mScrollView = findViewById(R.id.scroll_view);
        mStackScroller = findViewById(R.id.notification_stack_scroller);
        mKeyguardStatusBar = findViewById(R.id.keyguard_header);
        ViewStub userSwitcher = (ViewStub) findViewById(R.id.keyguard_user_switcher);
        userSwitcher.setOnInflateListener(this);
        mUserSwitcher = userSwitcher;
    
public voidonInflate(android.view.ViewStub stub, android.view.View inflated)

        if (stub == mUserSwitcher) {
            mUserSwitcher = inflated;
            mInflated = true;
        }