Notification is a common component that helps to pop-up a notification window with a content view.

A Notification can contain text and can be created using property.


Create with property

To create a notification using property, follow these steps:

  1. Create notification using the default constructor:

    View view = new View();
    notification = new Notification(view);
  2. Set the notification property:

    // Sets a user-defined animation to play when dismiss the notification.
    dismissAni = new Animation(3000);
    // Sets a user-defined animation to play when posting the notification.
    postAni = new Animation(3000);
    // Sets a priority level for the specified notification window, includes: None , Base , Medium , High , Top.
    // Need to add the privilege:
    // <privilege></privilege>.
    // Sets position and size of the notification window.
    positionSize = new Rectangle(0, 0, 600, 300);
    // Post a notification window with the content view.
    // Need to add the privilege:
    // <privilege></privilege>.
  3. Respond to OnWindowTouch:

    bool dismissOnTouch = true;
    notification.SetDismissOnTouch(dismissOnTouch);     // Dismiss notification window on touch if the value is true.
  • Dependencies
    • Tizen 6.0 and Higher