Class UIGadget
Definition
- Namespace:
- Tizen.Applications
- Assembly:
- Tizen.Applications.UIGadget.dll
Represents an UIGadget controlled lifecycle.
public abstract class UIGadget : IUIGadget
- Inheritance
-
objectUIGadget
- Implements
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
Constructors
View SourceUIGadget(UIGadgetType, ILoaderFactory, bool)
Initializes the UIGadget with DataLoader factory.
Declaration
public UIGadget(UIGadgetType type, ILoaderFactory loaderFactory, bool autoClose = true)
Parameters
| Type | Name | Description |
|---|---|---|
| UIGadgetType | type | The type of the UIGadget. |
| ILoaderFactory | loaderFactory | The factory that can create DataLoader object |
| bool | autoClose | Whether to automatically close the loader after execution |
Remarks
This constructor initializes a new instance of the UIGadget class based on the specified type with DataLoader. It is important to provide the correct type argument in order to ensure proper functionality and compatibility with other components.
UIGadget(UIGadgetType)
Initializes the UIGadget.
Declaration
public UIGadget(UIGadgetType type)
Parameters
| Type | Name | Description |
|---|---|---|
| UIGadgetType | type | The type of the UIGadget. |
Remarks
This constructor initializes a new instance of the UIGadget class based on the specified type. It is important to provide the correct type argument in order to ensure proper functionality and compatibility with other components.
Properties
View SourceClassName
The class name.
Declaration
public string ClassName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
This property is set before the OnCreate() is called, after the instance has been created. It provides access to the name of the class that was used to create the current instance.
DataLoader
The DataLoader.
Declaration
public DataLoader DataLoader { get; set; }
Property Value
| Type | Description |
|---|---|
| DataLoader |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
MainView
The main view of the UIGadget.
Declaration
public object MainView { get; set; }
Property Value
| Type | Description |
|---|---|
| object |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
State
The current lifecycle state of the UIGadget.
Declaration
public UIGadgetLifecycleState State { get; set; }
Property Value
| Type | Description |
|---|---|
| UIGadgetLifecycleState |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
Type
The type of the UIGadget.
Declaration
public UIGadgetType Type { get; }
Property Value
| Type | Description |
|---|---|
| UIGadgetType |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
UIGadgetInfo
The class representing information of the current UIGadget.
Declaration
public UIGadgetInfo UIGadgetInfo { get; set; }
Property Value
| Type | Description |
|---|---|
| UIGadgetInfo |
Remarks
This property is set before the OnCreate() is called, after the instance has been created. It provides details about the current UIGadget such as its ID, name, version, and other relevant information. By accessing this property, developers can retrieve the necessary information about the UIGadget they are working on.
UIGadgetResourceManager
The resource manager.
Declaration
public UIGadgetResourceManager UIGadgetResourceManager { get; set; }
Property Value
| Type | Description |
|---|---|
| UIGadgetResourceManager |
Remarks
This property is set before the OnCreate() is called, after the instance has been created. It provides access to various resources such as images, sounds, and fonts that can be used in your application. By utilizing the resource manager, you can easily manage and retrieve these resources without having to manually handle their loading and unloading. Additionally, the resource manager ensures efficient memory management by automatically handling the caching and recycling of resources.
Methods
View SourceFinish()
Finishes the UIGadget.
Declaration
public void Finish()
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
OnAppControlReceived(AppControlReceivedEventArgs)
Overrides this method if want to handle behavior when the UIGadget receives the appcontrol message.
Declaration
protected virtual void OnAppControlReceived(AppControlReceivedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| AppControlReceivedEventArgs | e | The appcontrol received event argument containing details about the received message. |
Remarks
This method provides a way to customize the response when the UIGadget receives an appcontrol message. By overriding this method in your derived class, you can define specific actions based on the incoming arguments.
OnCreate()
Override this method to define the behavior when the UIGadget is created. Calling 'base.OnCreate()' is necessary in order to emit the 'UIGadgetLifecycleChanged' event with the 'UIGadgetLifecycleState.Created' state.
Declaration
protected virtual object OnCreate()
Returns
| Type | Description |
|---|---|
| object | The main view object. |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
OnDestroy()
Override this method to handle the behavior when the UIGadget is destroyed. If 'base.OnDestroy()' is not called, the 'UIGadgetLifecycleChanged' event with the 'UIGadgetLifecycleState.Destroyed' state will not be emitted.
Declaration
protected virtual void OnDestroy()
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
OnDeviceOrientationChanged(DeviceOrientationEventArgs)
Overrides this method if want to handle behavior when the device orientation is changed.
Declaration
protected virtual void OnDeviceOrientationChanged(DeviceOrientationEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceOrientationEventArgs | e | The device orientation changed event argument. |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
OnLocaleChanged(LocaleChangedEventArgs)
Overrides this method if want to handle behavior when the system language is changed.
Declaration
protected virtual void OnLocaleChanged(LocaleChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| LocaleChangedEventArgs | e | The locale changed event argument. |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
OnLowBattery(LowBatteryEventArgs)
Overrides this method if want to handle behavior when the system battery is low.
Declaration
protected virtual void OnLowBattery(LowBatteryEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| LowBatteryEventArgs | e | The low batter event argument. |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
OnLowMemory(LowMemoryEventArgs)
Overrides this method if want to handle behavior when the system memory is low.
Declaration
protected virtual void OnLowMemory(LowMemoryEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| LowMemoryEventArgs | e | The low memory event argument. |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
OnMessageReceived(UIGadgetMessageReceivedEventArgs)
Overrides this method if want to handle behavior when the message is received.
Declaration
protected virtual void OnMessageReceived(UIGadgetMessageReceivedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| UIGadgetMessageReceivedEventArgs | e | The message received event argument. |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
OnPause()
Overrides this method if want to handle behavior when the UIGadget is paused. If 'base.OnPause()' is not called. the event 'UIGadgetLifecycleChanged' with the 'UIGadgetLifecycleState.Paused' state will not be emitted.
Declaration
protected virtual void OnPause()
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
OnPreCreate()
Override this method to define the behavior when the UIGadget is pre-created. Calling 'base.OnPreCreate()' is necessary in order to emit the 'UIGadgetLifecycleChanged' event with the 'UIGadgetLifecycleState.PreCreated' state.
Declaration
protected virtual void OnPreCreate()
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
OnRegionFormatChanged(RegionFormatChangedEventArgs)
Overrides this method if want to handle behavior when the region format is changed.
Declaration
protected virtual void OnRegionFormatChanged(RegionFormatChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| RegionFormatChangedEventArgs | e | The region format changed event argument. |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
OnResume()
Overrides this method if want to handle behavior when the UIGadget is resumed. If 'base.OnResume()' is not called. the event 'UIGadgetLifecycleChanged' with the 'UIGadgetLifecycleState.Resumed' state will not be emitted.
Declaration
protected virtual void OnResume()
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
SendMessage(Bundle)
Sends the message to the UIGadget. The message will be delived to the OnMessageReceived() method.
Declaration
public void SendMessage(Bundle message)
Parameters
| Type | Name | Description |
|---|---|---|
| Bundle | message | The message |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
Events
View SourceDataLoaderLifecycleChanged
Occurs when the lifecycle of the DataLoader is changed.
Declaration
public event EventHandler<DataLoaderLifecycleChangedEventArgs> DataLoaderLifecycleChanged
Event Type
| Type | Description |
|---|---|
| EventHandler<><DataLoaderLifecycleChangedEventArgs> |
Remarks
This event is raised when the state of DataLoader changes. It provides information about the current state through the DataLoaderLifecycleChangedEventArgs argument.
Explicit Interface Implementations
View SourceIUIGadget.OnAppControlReceived(AppControlReceivedEventArgs)
Declaration
void IUIGadget.OnAppControlReceived(AppControlReceivedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| AppControlReceivedEventArgs | args |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
IUIGadget.OnCreate()
Declaration
object IUIGadget.OnCreate()
Returns
| Type | Description |
|---|---|
| object |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
IUIGadget.OnDestroy()
Declaration
void IUIGadget.OnDestroy()
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
IUIGadget.OnDeviceOrientationChanged(DeviceOrientationEventArgs)
Declaration
void IUIGadget.OnDeviceOrientationChanged(DeviceOrientationEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| DeviceOrientationEventArgs | args |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
IUIGadget.OnLocaleChanged(LocaleChangedEventArgs)
Declaration
void IUIGadget.OnLocaleChanged(LocaleChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| LocaleChangedEventArgs | args |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
IUIGadget.OnLowBattery(LowBatteryEventArgs)
Declaration
void IUIGadget.OnLowBattery(LowBatteryEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| LowBatteryEventArgs | args |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
IUIGadget.OnLowMemory(LowMemoryEventArgs)
Declaration
void IUIGadget.OnLowMemory(LowMemoryEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| LowMemoryEventArgs | args |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
IUIGadget.OnMessageReceived(UIGadgetMessageReceivedEventArgs)
Declaration
void IUIGadget.OnMessageReceived(UIGadgetMessageReceivedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| UIGadgetMessageReceivedEventArgs | e |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
IUIGadget.OnPause()
Declaration
void IUIGadget.OnPause()
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
IUIGadget.OnPreCreate()
Declaration
void IUIGadget.OnPreCreate()
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
IUIGadget.OnRegionFormatChanged(RegionFormatChangedEventArgs)
Declaration
void IUIGadget.OnRegionFormatChanged(RegionFormatChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| RegionFormatChangedEventArgs | args |
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.
IUIGadget.OnResume()
Declaration
void IUIGadget.OnResume()
Remarks
This class provides functionality related to managing the lifecycle of an UIGadget. It enables developers to handle events such as initialization, activation, deactivation, and destruction of the UIGadget. By implementing this class, developers can define their own behavior for these events and customize the lifecycle of their UIGadget accordingly.