Nested Classes | ||
---|---|---|
interface | CapturingModeSelector.OnModeSelectListener | Interface definition for a callback to be invoked when the user changes capturing mode to a mode which belongs to current package and activity. |
interface | CapturingModeSelector.OnModeFinishListener | Interface definition for a callback to be invoked when the user changes capturing mode to a mode which belongs to different package or activity. |
Constants | ||
---|---|---|
java.lang.String | EXTRA_CAPTURING_MODE | When an add-on app is launched from the add-on framework, an intent is received which will set the EXTRA_CAPTURING_MODE field. |
Public Constructors | |
---|---|
CapturingModeSelector(Context context, ViewGroup parentView)
Constructor. |
Public Methods | |
---|---|
void |
open(java.lang.String modeName)
Open capturing mode selector. |
void |
close()
Close capturing mode selector. |
boolean |
isOpened()
Return true if capturing mode selector is opened. |
void |
setOnModeSelectListener(CapturingModeSelector.OnModeSelectListener onModeSelectListener)
Set a callback for capturing mode selector dialog. |
void |
setOnModeFinishListener(CapturingModeSelector.OnModeFinishListener onModeFinishListener)
Set a callback for capturing mode selector dialog. |
void |
setUiOrientation(int orientation)
Set the sensor orientation. |
void |
release()
Add-on application must call this method before constructing another CapturingModeSelector object. |
When an add-on app is launched from the add-on framework, an intent is received which will set the EXTRA_CAPTURING_MODE field.
The data type of the value is String.
The name of the add-on application that was launched is returned allowing you to determine which mode the user launched.
Constant Value: "com.sonymobile.camera.addon.intent.extra.CAPTURING_MODE"
Constructor.
context | context |
---|---|
parentView | parent view of the selector view |
Open capturing mode selector.
modeName | Current capturing mode name as defined in the mode XML file inside the AndroidManifest.xml Activity registration meta-data.
This value corresponds to the modeName of CapturingModeAttributes used to register capturing modes. This modeName may be used to identify the current mode. The add-on framework may use this for UI look and feel, for example to highlight the currently selected mode. |
---|
Close capturing mode selector.
Return true if capturing mode selector is opened.
Set a callback for capturing mode selector dialog. See CapturingModeSelector.OnModeSelectListener
onModeSelectListener | The listener will be invoked when another mode which is in the same package and same activity is selected. |
---|
Set a callback for capturing mode selector dialog. See CapturingModeSelector.OnModeFinishListener
onModeFinishListener | The listener will be invoked when the current mode is finished. |
---|
Set the sensor orientation.
orientation | Should be Configuration.ORIENTATION_LANDSCAPE or Configuration.ORIENTATION_PORTRAIT. |
---|
Add-on application must call this method before constructing another CapturingModeSelector object.
This class opens and closes the capturing mode selector. The mode selector provides access to all registered camera modes for camera add-ons available to the user. All methods must be called from the UI thread.