Class Notification.ActiveStyle
Definition
- Namespace:
- Tizen.Applications.Notifications
- Assembly:
- Tizen.Applications.Notification.dll
Class for generating active style notification.
public sealed class Notification.ActiveStyle : Notification.StyleBase
- Inheritance
-
objectNotification.Tizen.Applications.Notifications.Notification.MakerBaseNotification.ActiveStyle
Constructors
View SourceActiveStyle()
Initializes a new instance of the Notification.ActiveStyle class.
Declaration
public ActiveStyle()
Properties
View SourceBackgroundImage
Gets or sets an absolute path for an image file to display on the background of active notification.
Declaration
public string BackgroundImage { get; set; }
Property Value
Type | Description |
---|---|
string |
DefaultButton
Gets or sets the default button to display highlight on the active notification.
Declaration
public ButtonIndex DefaultButton { get; set; }
Property Value
Type | Description |
---|---|
ButtonIndex |
Remarks
The default button for display highlight is only reflected on the Tizen TV. If you use this property on other profile, this value has no effect.
HiddenByExternalAction
Gets or sets Action which is invoked when the notification is hidden by external factor.
Declaration
public AppControl HiddenByExternalAction { get; set; }
Property Value
Type | Description |
---|---|
AppControl |
Remarks
If you set it to null, the already set AppControl will be removed and nothing will happen when notification is hidden by external factor. The property is only reflected on Tizen TV. If you use this API on other profile, this action settings have no effect
See Also
View SourceHiddenByTimeoutAction
Gets or sets Action which is invoked when there is no any response by user until hide timeout.
Declaration
public AppControl HiddenByTimeoutAction { get; set; }
Property Value
Type | Description |
---|---|
AppControl |
Remarks
This action occurs when there is no response to the notification until the delete timeout set by SetRemoveTime(). If you set it to null, the already set AppControl will be removed and nothing will happen when notification is hidden by timeout. The property is only reflected on Tizen TV. If you use this API on other profile, this action settings have no effect
See Also
View SourceHiddenByUserAction
Gets or sets Action which is invoked when notification is hidden by user.
Declaration
public AppControl HiddenByUserAction { get; set; }
Property Value
Type | Description |
---|---|
AppControl |
Remarks
If you set it to null, the already set AppControl will be removed and nothing will happen when notification is hidden by user. The property is only reflected on Tizen TV. If you use this API on other profile, this action have no effect
See Also
View SourceIsAutoRemove
Gets or sets a value indicating whether the active notification is removed automatically. Default value is true.
Declaration
public bool IsAutoRemove { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
IsAutoRemove option lets the active notification to be removed several seconds after it shows. When 'IsAutoRemove' is set as false, the active notification will not be removed as long as the user removes it or the application, which posted the active notification.
ReplyAction
Gets or sets a ReplyAction to this active notification style.
Declaration
public Notification.ReplyAction ReplyAction { get; set; }
Property Value
Type | Description |
---|---|
Notification.ReplyAction |
Remarks
When you add a ReplyAction to the ActiveStyle, the notification UI will show a ReplyAction with button. If you set null parameter, ReplyAction is not displayed.
Examples
ButtonAction button = new ButtonAction
{
Index = ButtonIndex.First,
Text = "Yes"
Action = new AppControl{ ApplicationId = "org.tizen.app" };
};
ReplyAction reply = new ReplyAction
{
ParentIndex = ButtonIndex.First;
PlaceHolderText = "Please write your reply."
ReplyMax = 160,
Button = new ButtonAction
{
Text = "Yes",
ImagePath = "image path"
Action = new AppControl{ ApplicationId = "org.tizen.app" };
};
};
ActiveStyle active = new ActiveStyle
{
AutoRemove = true,
BackgroundImage = "image path",
ReplyAction = reply
};
active.AddButtonAction(button);
Methods
View SourceAddButtonAction(ButtonAction)
Method to add a button to the active notification style. Buttons are displayed on the notification.
Declaration
public void AddButtonAction(Notification.ButtonAction button)
Parameters
Type | Name | Description |
---|---|---|
Notification.ButtonAction | button | A ButtonAction for appear to the notification. |
Remarks
If you add button that has same index, the button is replaced to latest adding button. If you don't set an index on ButtonAction, the index is set sequentially from zero.
Examples
ButtonAction button = new ButtonAction
{
Index = 0,
Text = "Yes"
Action = new AppControl{ ApplicationId = "org.tizen.app" };
};
ActiveStyle active = new ActiveStyle
{
IsAutoRemove = true,
BackgroundImage = "image path",
};
active.AddButtonAction(button);
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when an argument is invalid. |
GetButtonAction(ButtonIndex)
Gets the ButtonAction of the active notification.
Declaration
public Notification.ButtonAction GetButtonAction(ButtonIndex index)
Parameters
Type | Name | Description |
---|---|---|
ButtonIndex | index | The index to get a button you already added. |
Returns
Type | Description |
---|---|
Notification.ButtonAction | The ButtonAction object, which you already added. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when an argument is invalid. |
GetRemoveTime(out int, out int)
Method to get time set to hide or delete notification.
Declaration
public void GetRemoveTime(out int hideTime, out int deleteTime)
Parameters
Type | Name | Description |
---|---|---|
int | hideTime | The value in seconds when the notification can be hidden from the notification viewer after notification is posted. |
int | deleteTime | The value in seconds when the notification can be deleted from the notification list in setting application after notification is posted. |
RemoveButtonAction(ButtonIndex)
Removes the ButtonAction you already added.
Declaration
public bool RemoveButtonAction(ButtonIndex index)
Parameters
Type | Name | Description |
---|---|---|
ButtonIndex | index | The index to remove a button. |
Returns
Type | Description |
---|---|
bool | true if the element is successfully found and removed; otherwise, false. |
SetRemoveTime(int, int)
Method to set time to hide or delete notification.
Declaration
public void SetRemoveTime(int hideTime, int deleteTime)
Parameters
Type | Name | Description |
---|---|---|
int | hideTime | The value in seconds when the notification can be hidden from the notification viewer after the notification is posted. |
int | deleteTime | The value in seconds when the notification can be deleted from the notification list in setting application after notification is posted. |
Remarks
The time settings for hiding and deleting are only reflected on the Tizen TV. If you use this API on other profile, this time settings have no effect.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when argument is invalid. |