-
Notifications
You must be signed in to change notification settings - Fork 55
Exposure Settings Indicator Widget
siddutgikar edited this page May 12, 2020
·
2 revisions
This widget displays the camera exposure mode. Tapping on the widget can be used to open the exposure settings panel. The exposure modes are as below
Icon | Description |
---|---|
/images/widgets/cameracontrols/exposuresettingsindicator/ic_auto.png | Auto/Program Exposure Mode |
/images/widgets/cameracontrols/exposuresettingsindicator/ic_aperture.png | Aperture Priority Mode |
/images/widgets/cameracontrols/exposuresettingsindicator/ic_shutter.png | Shutter Priority Mode |
/images/widgets/cameracontrols/exposuresettingsindicator/ic_manual.png | Manual Mode |
<dji.ux.beta.cameracore.widget.cameracontrols.exposuresettingsindicator.ExposureSettingsIndicatorWidget
android:id="@+id/widget_camera_control_camera_exposure_settings"
android:layout_width="100dp"
android:layout_height="100dp"/>
The widget can be customized by the user to serve their purpose and theme.
<dji.ux.beta.cameracore.widget.cameracontrols.exposuresettingsindicator.ExposureSettingsIndicatorWidget
android:id="@+id/widget_camera_control_camera_exposure_settings"
android:layout_width="100dp"
android:layout_height="100dp"
app:aperturePriorityModeDrawable="@drawable/ic_custom_aperture"
app:programModeDrawable="@drawable/ic_custom_auto"
app:shutterPriorityModeDrawable="@drawable/ic_custom_shutter"
app:manualModeDrawable="@drawable/ic_custom_manual" />
ExposureSettingsIndicatorWidget exposureSettingsIndicatorWidget = findViewById(R.id.widget_camera_control_camera_exposure_settings);
exposureSettingsIndicatorWidget.setIconByMode(ExposureMode.PROGRAM, getResources().getDrawable(R.drawable.ic_custom_auto));
exposureSettingsIndicatorWidget.setIconByMode(ExposureMode.SHUTTER_PRIORITY, getResources().getDrawable(R.drawable.ic_custom_shutter));
exposureSettingsIndicatorWidget.setIconByMode(ExposureMode.APERTURE_PRIORITY, getResources().getDrawable(R.drawable.ic_custom_aperture));
exposureSettingsIndicatorWidget.setIconByMode(ExposureMode.MANUAL, getResources().getDrawable(R.drawable.ic_custom_manual));
Icon | Description |
---|---|
/images/widgets/cameracontrols/exposuresettingsindicator/ic_custom_auto.png | Auto/Program Exposure Mode |
/images/widgets/cameracontrols/exposuresettingsindicator/ic_custom_aperture.png | Aperture Priority Mode |
/images/widgets/cameracontrols/exposuresettingsindicator/ic_custom_shutter.png | Shutter Priority Mode |
/images/widgets/cameracontrols/exposuresettingsindicator/ic_custom_manual.png | Manual Mode |
List of the customizable XML attributes
-
uxsdk_cameraIndex
- The camera index to which the widget should react -
uxsdk_iconBackground
- The background of the icon -
uxsdk_aperturePriorityModeDrawable
- The icon to be shown for aperture priority mode -
uxsdk_shutterPriorityModeDrawable
- The icon to be shown for shutter priority mode -
uxsdk_programModeDrawable
- The icon to be shown for program/auto mode -
uxsdk_manualModeDrawable
- The icon to be shown for manual mode
List of the customization APIs
-
public void setCameraIndex(@NonNull CameraIndex cameraIndex)
- set the camera index for which the widget should react -
@NonNull public CameraIndex getCameraIndex()
- get the camera index for which the widget is reacting -
public void setIconByMode(@NonNull ExposureMode exposureMode, @DrawableRes int resourceId)
- Set the icon based on exposure mode -
public void setIconByMode(@NonNull ExposureMode exposureMode, @Nullable Drawable drawable
- Set the icon based on exposure mode -
@Nullable public Drawable getIconByMode(@NonNull ExposureMode exposureMode)
- Get the based on exposure mode -
public void setIconBackground(@DrawableRes int resourceId)
- Set the background of the icon -
public void setIconBackground(@Nullable Drawable drawable)
- Set the background of the icon -
@Nullable public Drawable getIconBackground()
- Get the background of icon
DJI UX SDK Version 5 Beta 5
UX SDK 5.0 Overview
Core Module
Camera Core Module
Visual Cameras Module
- Camera Config