@Override public void setDark(boolean dark, boolean fade) { super.setDark(dark, fade); final NotificationContentView showing = getShowingLayout(); if (showing != null) { showing.setDark(dark, fade); } }
@Override public void setClipTopAmount(int clipTopAmount) { super.setClipTopAmount(clipTopAmount); mPrivateLayout.setClipTopAmount(clipTopAmount); mPublicLayout.setClipTopAmount(clipTopAmount); if (mGuts != null) { mGuts.setClipTopAmount(clipTopAmount); } }
@Override public void setActualHeight(int height, boolean notifyListeners) { mPrivateLayout.setActualHeight(height); mPublicLayout.setActualHeight(height); if (mGuts != null) { mGuts.setActualHeight(height); } invalidate(); super.setActualHeight(height, notifyListeners); }
@Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); boolean updateExpandHeight = mMaxExpandHeight == 0 && !mWasReset; updateMaxExpandHeight(); if (updateExpandHeight) { applyExpansionToLayout(); } mWasReset = false; }
@Override protected void onFinishInflate() { super.onFinishInflate(); mPublicLayout = (NotificationContentView) findViewById(R.id.expandedPublic); mPrivateLayout = (NotificationContentView) findViewById(R.id.expanded); ViewStub gutsStub = (ViewStub) findViewById(R.id.notification_guts_stub); gutsStub.setOnInflateListener( new ViewStub.OnInflateListener() { @Override public void onInflate(ViewStub stub, View inflated) { mGuts = (NotificationGuts) inflated; mGuts.setClipTopAmount(getClipTopAmount()); mGuts.setActualHeight(getActualHeight()); } }); mVetoButton = findViewById(R.id.veto); }
/** Resets this view so it can be re-used for an updated notification. */ @Override public void reset() { super.reset(); mRowMinHeight = 0; final boolean wasExpanded = isExpanded(); mRowMaxHeight = 0; mExpandable = false; mHasUserChangedExpansion = false; mUserLocked = false; mShowingPublic = false; mSensitive = false; mShowingPublicInitialized = false; mIsSystemExpanded = false; mExpansionDisabled = false; mPublicLayout.reset(); mPrivateLayout.reset(); resetHeight(); logExpansionEvent(false, wasExpanded); }