Class Notification.ActiveStyle
Definition
- Namespace:
- Tizen.Applications.Notifications
- Assembly:
- Tizen.Applications.Notification.dll
- API Level:
- 3
Class for generating active style notification.
C#Copypublic sealed class ActiveStyle : Notification.StyleBase
- Inheritance
-
Tizen.Applications.Notifications.Notification.MakerBaseNotification.ActiveStyle
Constructors
Declaration
C#Copypublic ActiveStyle()
API Level: 3
Properties
BackgroundImage
Gets or sets an absolute path for an image file to display on the background of active notification.
Declaration
C#Copypublic string BackgroundImage { get; set; }
Property Value
Type | Description |
---|---|
System.String |
API Level: 3
DefaultButton
Gets or sets the default button to display highlight on the active notification.
Declaration
C#Copypublic 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.
API Level: 3
HiddenByExternalAction
Gets or sets Action which is invoked when the notification is hidden by external factor.
Declaration
C#Copypublic 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
API Level: 4
HiddenByTimeoutAction
Gets or sets Action which is invoked when there is no any response by user until hide timeout.
Declaration
C#Copypublic 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
API Level: 4
HiddenByUserAction
Gets or sets Action which is invoked when notification is hidden by user.
Declaration
C#Copypublic 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
API Level: 4
IsAutoRemove
Gets or sets a value indicating whether the active notification is removed automatically. Default value is true.
Declaration
C#Copypublic bool IsAutoRemove { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
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.
API Level: 3
Declaration
C#Copypublic 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
CopyButtonAction 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);
API Level: 3
Methods
AddButtonAction(Notification.ButtonAction)
Method to add a button to the active notification style. Buttons are displayed on the notification.
Declaration
C#Copypublic 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
CopyButtonAction 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. |
API Level: 3
Declaration
C#Copypublic 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. |
API Level: 3
GetRemoveTime(out Int32, out Int32)
Method to get time set to hide or delete notification.
Declaration
C#Copypublic void GetRemoveTime(out int hideTime, out int deleteTime)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | hideTime | The value in seconds when the notification can be hidden from the notification viewer after notification is posted. |
System.Int32 | deleteTime | The value in seconds when the notification can be deleted from the notification list in setting application after notification is posted. |
API Level: 3
Declaration
C#Copypublic bool RemoveButtonAction(ButtonIndex index)
Parameters
Type | Name | Description |
---|---|---|
ButtonIndex | index | The index to remove a button. |
Returns
Type | Description |
---|---|
System.Boolean | true if the element is successfully found and removed; otherwise, false. |
API Level: 3
Declaration
C#Copypublic void SetRemoveTime(int hideTime, int deleteTime)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | hideTime | The value in seconds when the notification can be hidden from the notification viewer after the notification is posted. |
System.Int32 | 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. |