public abstract class NotificationViewWrapper extends Object implements com.android.systemui.statusbar.TransformableView
Modifier and Type | Field and Description |
---|---|
protected boolean |
mDark |
protected boolean |
mDarkInitialized |
protected ColorMatrix |
mGrayscaleColorMatrix |
protected com.android.systemui.statusbar.ExpandableNotificationRow |
mRow |
protected View |
mView |
Modifier | Constructor and Description |
---|---|
protected |
NotificationViewWrapper(View view,
com.android.systemui.statusbar.ExpandableNotificationRow row) |
Modifier and Type | Method and Description |
---|---|
TransformState |
getCurrentState(int fadingView)
Get the current state of a view in a transform animation
|
int |
getCustomBackgroundColor() |
NotificationHeaderView |
getNotificationHeader() |
void |
notifyContentUpdated(StatusBarNotification notification)
Notifies this wrapper that the content of the view might have changed.
|
void |
setContentHeight(int contentHeight,
int minHeightHint) |
void |
setDark(boolean dark,
boolean fade,
long delay)
In dark mode, we draw as little as possible, assuming a black background.
|
void |
setShowingLegacyBackground(boolean showing) |
void |
setVisible(boolean visible)
Set this view to be fully visible or gone
|
protected void |
startIntensityAnimation(ValueAnimator.AnimatorUpdateListener updateListener,
boolean dark,
long delay,
Animator.AnimatorListener listener) |
void |
transformFrom(com.android.systemui.statusbar.TransformableView notification)
Transform to this view from the given view
|
void |
transformFrom(com.android.systemui.statusbar.TransformableView notification,
float transformationAmount)
Transform to this view from the given view by a specified amount.
|
void |
transformTo(com.android.systemui.statusbar.TransformableView notification,
float transformationAmount)
Transform to the given view by a specified amount.
|
void |
transformTo(com.android.systemui.statusbar.TransformableView notification,
Runnable endRunnable)
Transform to the given view
|
void |
updateExpandability(boolean expandable,
View.OnClickListener onClickListener)
Update the appearance of the expand button.
|
protected void |
updateGrayscaleMatrix(float intensity) |
static NotificationViewWrapper |
wrap(Context ctx,
View v,
com.android.systemui.statusbar.ExpandableNotificationRow row) |
protected final ColorMatrix mGrayscaleColorMatrix
protected final View mView
protected final com.android.systemui.statusbar.ExpandableNotificationRow mRow
protected boolean mDark
protected boolean mDarkInitialized
protected NotificationViewWrapper(View view, com.android.systemui.statusbar.ExpandableNotificationRow row)
public static NotificationViewWrapper wrap(Context ctx, View v, com.android.systemui.statusbar.ExpandableNotificationRow row)
public void setDark(boolean dark, boolean fade, long delay)
dark
- whether we should display ourselves in dark modefade
- whether to animate the transition if the mode changesdelay
- if fading, the delay of the animationpublic void notifyContentUpdated(StatusBarNotification notification)
notification
- protected void startIntensityAnimation(ValueAnimator.AnimatorUpdateListener updateListener, boolean dark, long delay, Animator.AnimatorListener listener)
protected void updateGrayscaleMatrix(float intensity)
public void updateExpandability(boolean expandable, View.OnClickListener onClickListener)
expandable
- should this view be expandableonClickListener
- the listener to invoke when the expand affordance is clicked onpublic NotificationHeaderView getNotificationHeader()
public TransformState getCurrentState(int fadingView)
com.android.systemui.statusbar.TransformableView
getCurrentState
in interface com.android.systemui.statusbar.TransformableView
fadingView
- which view we are interested inpublic void transformTo(com.android.systemui.statusbar.TransformableView notification, Runnable endRunnable)
com.android.systemui.statusbar.TransformableView
transformTo
in interface com.android.systemui.statusbar.TransformableView
notification
- the view to transform topublic void transformTo(com.android.systemui.statusbar.TransformableView notification, float transformationAmount)
com.android.systemui.statusbar.TransformableView
transformTo
in interface com.android.systemui.statusbar.TransformableView
notification
- the view to transform totransformationAmount
- how much transformation should be donepublic void transformFrom(com.android.systemui.statusbar.TransformableView notification)
com.android.systemui.statusbar.TransformableView
transformFrom
in interface com.android.systemui.statusbar.TransformableView
notification
- the view to transform frompublic void transformFrom(com.android.systemui.statusbar.TransformableView notification, float transformationAmount)
com.android.systemui.statusbar.TransformableView
transformFrom
in interface com.android.systemui.statusbar.TransformableView
notification
- the view to transform fromtransformationAmount
- how much transformation should be donepublic void setVisible(boolean visible)
com.android.systemui.statusbar.TransformableView
setVisible
in interface com.android.systemui.statusbar.TransformableView
public int getCustomBackgroundColor()
public void setShowingLegacyBackground(boolean showing)
public void setContentHeight(int contentHeight, int minHeightHint)