| java.lang.Object | |
| ↳ | com.samsung.android.knox.custom.WidgetItem |
This class defines a custom widget item in the home screen shortcuts.
| API level 20 |
| Version 2.7 |
|
[Expand]
Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
| |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Class constructor.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Not implemented.
| |||||||||||
This method gets the CellX, internal member assigned in the constructor.
| |||||||||||
This method gets the CellY, internal member assigned in the constructor.
| |||||||||||
This method gets the Intent, internal member assigned in the constructor.
| |||||||||||
This method gets the MoreItems, internal member assigned in the constructor.
| |||||||||||
This method gets the Parent, internal member assigned in the constructor.
| |||||||||||
This method gets the SizeX, internal member assigned in the constructor.
| |||||||||||
This method gets the SizeY, internal member assigned in the constructor.
| |||||||||||
This method gets the WidgetId, internal member assigned in the constructor.
| |||||||||||
This method gets the WidgetType, internal member assigned in the constructor.
| |||||||||||
This method returns the string representation of this class instance.
| |||||||||||
This method flatten this object in to a Parcel (out).
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Parcelable
| |||||||||||
Class constructor.
| widgetType | Specifies type of widget to be added: WIDGET_APP_TYPE or WIDGET_SURFACE_TYPE. |
|---|---|
| intent | Specifies intent of widget. |
| widgetId | Specifies ID of widget or USE_DEFAULT for system default value. |
| parent | Specifies screen in which the widget will be added. |
| x | Specifies horizontal offset of widget location. |
| y | Specifies vertical offset of widget location. |
| sizeX | Specifies horizontal size of widget. |
| sizeY | Specifies vertical size of widget. |
| moreItems | Specifies if there are more widgets to be added ON or OFF. Note: This parameter should be set to ON whilst the widgets are being added and set to OFF for the final widget. |
int widgetType = CustomDeviceManager.WIDGET_APP_TYPE; // Adding widget
int widget_X = 0;
int widget_Y = 1;
int widget_SizeX = 4;
int widget_SizeY = 1;
int widgetId = CustomDeviceManager.USE_DEFAULT;
moreItems = CustomDeviceManager.OFF;
String widgetPackage = "com.example.widget";
String widgetProvider = ".WidgetProvider";
ComponentName widgetProvider = new ComponentName(widgetPackage, widgetProvider);
Intent widgetIntent = new Intent();
widgetIntent.setComponent(widgetProvider);
WidgetItem widgetItem = new WidgetItem(widgetType, widgetIntent,
widgetId, kcsm.getParentScreen(3), widget_X, widget_Y, widget_SizeX, widget_SizeY, moreItems);
|
| API level 20 |
| Version 2.7 |
Not implemented.
| API level 20 |
| Version 2.7 |
This method gets the CellX, internal member assigned in the constructor.
| API level 20 |
| Version 2.7 |
This method gets the CellY, internal member assigned in the constructor.
| API level 20 |
| Version 2.7 |
This method gets the Intent, internal member assigned in the constructor.
| API level 20 |
| Version 2.7 |
This method gets the MoreItems, internal member assigned in the constructor.
| API level 20 |
| Version 2.7 |
This method gets the Parent, internal member assigned in the constructor.
| API level 20 |
| Version 2.7 |
This method gets the SizeX, internal member assigned in the constructor.
| API level 20 |
| Version 2.7 |
This method gets the SizeY, internal member assigned in the constructor.
| API level 20 |
| Version 2.7 |
This method gets the WidgetId, internal member assigned in the constructor.
| API level 20 |
| Version 2.7 |
This method gets the WidgetType, internal member assigned in the constructor.
| API level 20 |
| Version 2.7 |
This method returns the string representation of this class instance.
| API level 20 |
| Version 2.7 |
This method flatten this object in to a Parcel (out).
| out | The parcel where the data is written. |
|---|---|
| flags | Not used. |
| API level 20 |
| Version 2.7 |