NotificationsQuickSettingsContainerpublic class NotificationsQuickSettingsContainer extends android.widget.FrameLayout implements ViewStub.OnInflateListenerThe 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 |
Methods Summary |
---|
protected boolean | drawChild(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.WindowInsets | onApplyWindowInsets(android.view.WindowInsets insets)
setPadding(0, 0, 0, insets.getSystemWindowInsetBottom());
return insets;
| protected void | onFinishInflate()
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 void | onInflate(android.view.ViewStub stub, android.view.View inflated)
if (stub == mUserSwitcher) {
mUserSwitcher = inflated;
mInflated = true;
}
|
|