-
Notifications
You must be signed in to change notification settings - Fork 55
Shoot Photo Widget
The widget can be used for clicking a photo. It also displays the camera photo mode and the storage state errors. Tapping the widget will start clicking photos. The following images indicate some of the operational states of the widget in the default (widget is non-customized and the connected camera is not Hasselblad) state.
- - Default state when photo mode is SINGLE
- - Default state when photo mode is BURST_3
- - Default state when photo mode is AEB_5
- - Default state when photo mode is INTERVAL_15s
- - Default state when sd card is not inserted
- - Default state when photo mode is SSD is full
Mavic 2 Pro has a Hasselblad camera. The widget will also indicate when the Mavic 2 Pro is connected by changing the capture widget theme to orange. The images below indicate some of the operational states when Mavic 2 Pro is connected.
- - Default Hasselblad state when photo mode is SINGLE
- - Default Hasselblad state when photo mode is BURST_14
- - Default Hasselblad state when photo mode is AEB_3
- - Default Hasselblad state when photo mode is INTERVAL_20s
- - Default Hasselblad state when sd card is not inserted
- - Default Hasselblad state when internal storage is slow
<dji.ux.beta.cameracore.widget.cameracapture.shootphoto.ShootPhotoWidget
android:id="@+id/widget_shoot_photo"
android:layout_width="75dp"
android:layout_height="75dp" />
The widget can be customized by the user to serve their purpose and theme.
<dji.ux.beta.cameracore.widget.cameracapture.shootphoto.ShootPhotoWidget
android:id="@+id/widget_shoot_photo"
android:layout_width="75dp"
android:layout_height="75dp"
app:uxsdk_shootPhotoStartIcon="@drawable/shape_circle"
app:uxsdk_progressRingColor="@color/green_material_800_67_percent"/>
ShootPhotoWidget shootPhotoWidget = findViewById(R.id.widget_shoot_photo);
shootPhotoWidget.setShootPhotoStartIcon(getResources().getDrawable(R.drawable.shape_circle));
shootPhotoWidget.setProgressRingColor(getResources().getColor(R.color.green_material_800_67_percent));
- - Customized state when photo mode is SINGLE
- - Customized stop shooting photo state
- - Custom state when photo mode is AEB_3
- - Custom state when photo mode is INTERVAL_20s
- - Custom state when sd card is not inserted
List of the customizable XML attributes
-
uxsdk_cameraIndex
- The camera index to which the widget should react -
uxsdk_progressRingColor
- The color of the progress ring -
uxsdk_progressRingHasselbladColor
- The color of the progress ring when a product with Hasselblad camera is connected -
uxsdk_shootPhotoStartIcon
- The start shooting photo icon -
uxsdk_shootPhotoStopIcon
- The stop shooting photo icon -
uxsdk_shootPhotoStartHasselbladIcon
- The start shooting photo icon when a product with Hasselblad camera is connected -
uxsdk_shootPhotoStopHasselbladIcon
- The stop shooting photo icon when a product with Hasselblad camera is connected -
uxsdk_ssdFullIcon
- The icon to show SSD is full -
uxsdk_ssdSlowIcon
- The icon to show SSD is slow -
uxsdk_ssdNotInsertedIcon
- The icon to show SSD is not inserted -
uxsdk_sdCardFullIcon
- The icon to show SD Card is full -
uxsdk_sdCardSlowIcon
- The icon to show SD Card is slow -
uxsdk_sdCardNotInsertedIcon
- The icon to show SD Card is not inserted -
uxsdk_internalStorageFullIcon
- The icon to show internal storage is full -
uxsdk_internalStorageSlowIcon
- The icon to show internal storage is slow -
uxsdk_internalStorageNotInsertedIcon
- The icon to show internal storage is not inserted -
uxsdk_foregroundIconBackground
- The background of the storage state/photo mode icon
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 setStartShootPhotoDrawable(@DrawableRes int resourceId)
- set the start shooting photo drawable -
public void setStartShootPhotoDrawable(@Nullable Drawable drawable)
- set the start shooting photo drawable -
@Nullable public Drawable getStartShootPhotoDrawable()
- get the current start shooting photo drawable -
public void setStopShootPhotoDrawable(@DrawableRes int resourceId)
- set the stop shooting photo drawable -
public void setStopShootPhotoDrawable(@Nullable Drawable drawable)
- set the stop shooting photo drawable -
@Nullable public Drawable getStopShootPhotoDrawable()
- get the current stop shooting photo drawable -
public void setStartShootHasselbladPhotoDrawable(@DrawableRes int resourceId)
- set the start shooting photo drawable when a product with Hasselblad camera is connected. Currently on Mavic 2 Pro -
public void setStartShootHasselbladPhotoDrawable(@Nullable Drawable drawable)
- set the start shooting photo drawable when a product with Hasselblad camera is connected. Currently on Mavic 2 Pro -
@Nullable public Drawable getStartShootHasselbladPhotoDrawable()
- get the current start shooting photo drawable when a product with Hasselblad camera is connected. Currently on Mavic 2 Pro -
public void setStopShootHasselbladPhotoDrawable(@DrawableRes int resourceId)
- set the stop shooting photo drawable for Hasselblad camera. Currently on Mavic 2 Pro -
public void setStopShootHasselbladPhotoDrawable(@Nullable Drawable drawable)
- set the stop shooting photo drawable for Hasselblad camera. Currently on Mavic 2 Pro -
@Nullable public Drawable getStopShootHasselbladPhotoDrawable()
- get the current stop shooting photo drawable for Hasselblad camera. Currently on Mavic 2 Pro -
public void setInternalStorageIcon(@NonNull StorageIconState storageIconState, @DrawableRes int resourceId)
- set the storage state icon for internal storage -
public void setInternalStorageIcon(@NonNull StorageIconState storageIconState, @DrawableRes int resourceId)
- set the storage state icon for internal storage -
@Nullable public Drawable getInternalStorageIcon(@NonNull StorageIconState storageIconState)
- get the storage state icon for internal storage -
public void setSDCardStorageIcon(@NonNull StorageIconState storageIconState, @DrawableRes int resourceId)
- set the storage state icon for SD Card -
public void setSDCardStorageIcon(@NonNull StorageIconState storageIconState, @DrawableRes int resourceId)
- set the storage state icon for SD Card -
@Nullable public Drawable getSDCardStorageIcon(@NonNull StorageIconState storageIconState)
- get the storage state icon for SD Card -
public void setSSDStorageIcon(@NonNull StorageIconState storageIconState, @DrawableRes int resourceId)
- set the storage state icon for SSD storage -
public void setSSDStorageIcon(@NonNull StorageIconState storageIconState, @DrawableRes int resourceId)
- set the storage state icon for SSD storage -
@Nullable public Drawable getSSDStorageIcon(@NonNull StorageIconState storageIconState)
- get the storage state icon for SSD storage -
public void setForegroundIconBackground(@DrawableRes int resourceId)
- Set the background of storage state or photo mode icon -
public void setForegroundIconBackground(@Nullable Drawable drawable)
- Set the background of storage state or photo mode icon -
@Nullable public void getForegroundIconBackground(@Nullable Drawable drawable)
- Get the background of storage state or photo mode icon -
public void setProgressRingColor(@ColorInt int color)
- Set the color of the progress ring -
@ColorInt public int getProgressRingColor()
- Get the color of the progress ring -
public void setProgressRingHasselbladColor(@ColorInt int color)
- Set the color of the progress ring when a product with Hasselblad camera is connected -
@ColorInt public int getProgressRingHasselbladColor()
- Get the color of the progress ring when a product with Hasselblad camera is connected
DJI UX SDK Version 5 Beta 5
UX SDK 5.0 Overview
Core Module
Camera Core Module
Visual Cameras Module
- Camera Config