Class BottomNotification<T>
A base class for notification displayed at the bottom of the screen.
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: solution.dll
Syntax
public abstract class BottomNotification<T> : Popup<T> where T : BottomNotification<T>
Type Parameters
Name | Description |
---|---|
T | The sealed Notification popup class type. |
Constructors
BottomNotification(VisualElement, VisualElement)
Default constructor.
Declaration
protected BottomNotification(VisualElement parentView, VisualElement view)
Parameters
Type | Name | Description |
---|---|---|
VisualElement | parentView | The popup container. |
VisualElement | view | The popup visual element itself. |
Properties
animationMode
Returns the animation used by the bar when it will be displayed.
Declaration
public AnimationMode animationMode { get; }
Property Value
Type | Description |
---|---|
AnimationMode |
duration
Returns the specified display duration of the bar.
Declaration
public NotificationDuration duration { get; }
Property Value
Type | Description |
---|---|
NotificationDuration |
isShown
Returns True if the bar is currently displayed on the screen, False otherwise.
Declaration
public bool isShown { get; }
Property Value
Type | Description |
---|---|
bool |
isShownOrQueued
Returns True if the bar is currently displayed or queued for display on the screen, False otherwise.
Declaration
public bool isShownOrQueued { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
AnimateViewIn()
Start the animation for this popup.
Declaration
protected override void AnimateViewIn()
Overrides
AnimateViewOut(DismissType)
Start the hide animation for this popup.
Declaration
protected override void AnimateViewOut(DismissType reason)
Parameters
Type | Name | Description |
---|---|---|
DismissType | reason | The reason why the popup should be dismissed. |
Overrides
Dismiss(DismissType)
Dismiss the Popup.
Declaration
public override void Dismiss(DismissType reason)
Parameters
Type | Name | Description |
---|---|---|
DismissType | reason | Why the element has been dismissed. |
Overrides
FindSuitableParent(VisualElement)
Find the parent VisualElement where the popup will be added.
Declaration
protected override VisualElement FindSuitableParent(VisualElement element)
Parameters
Type | Name | Description |
---|---|---|
VisualElement | element | An arbitrary UI element inside the panel. |
Returns
Type | Description |
---|---|
VisualElement | The popup container VisualElement in the current panel. |
Overrides
InvokeDismissedEventHandlers(DismissType)
Called when the popup has been dismissed. This method will invoke any handlers attached to the dismissed event.
Declaration
protected override void InvokeDismissedEventHandlers(DismissType reason)
Parameters
Type | Name | Description |
---|---|---|
DismissType | reason |
Overrides
InvokeShownEventHandlers()
Called when the popup has become visible. This method will invoke any handlers attached to the shown event.
Declaration
protected override void InvokeShownEventHandlers()
Overrides
SetAnimationMode(AnimationMode)
Set a new value for the animationMode property.
Declaration
public T SetAnimationMode(AnimationMode animation)
Parameters
Type | Name | Description |
---|---|---|
AnimationMode | animation | THe new value |
Returns
Type | Description |
---|---|
T | The current object instance to continuously build the element. |
SetDuration(NotificationDuration)
Set the duration the notification should be displayed.
Declaration
public virtual T SetDuration(NotificationDuration durationValue)
Parameters
Type | Name | Description |
---|---|---|
NotificationDuration | durationValue | A duration enum value. |
Returns
Type | Description |
---|---|
T | The current object instance to continuously build the element. |
ShouldAnimate()
Implement this method to know if the popup should call AnimateViewIn() and AnimateViewOut(DismissType) methods or not.
Declaration
protected override bool ShouldAnimate()
Returns
Type | Description |
---|---|
bool |
|
Overrides
Show()
Show the Popup.
Declaration
public override void Show()