-
Notifications
You must be signed in to change notification settings - Fork 54
Camera Controls Widget
The camera controls widget is a compound widget that aggregates the functionality related to the camera. Camera Settings Menu Indicator Widget, Photo Video Switch Widget, Camera Capture Widget and Exposure Settings Indicator Widget.
<dji.ux.beta.cameracore.widget.cameracontrols.CameraControlsWidget
android:id="@+id/widget_camera_controls"
android:layout_width="50dp"
android:layout_height="200dp"/>
As a part of customization, the widget provides access to its children. This will enable the user to customize the widget to match their theming.
CameraControlsWidget cameraControlsWidget = findViewById(R.id.widget_camera_controls);
cameraControlsWidget.setBackgroundColor(Color.White);
cameraControlsWidget.getCameraSettingsMenuIndicatorWidget().setLabelTextColor(Color.BLUE);
cameraControlsWidget.getPhotoVideoSwitchWidget().setPhotoModeIcon(getResources().getDrawable(R.drawable.ic_blue_photo_mode));
cameraControlsWidget.getCameraCaptureWidget().setStartShootPhotoDrawable(getResources().getDrawable(R.drawable.ic_blue_startPhoto));
cameraControlsWidget.getCameraCaptureWidget()..setProgressRingColor(Color.BLUE);
cameraControlsWidget.getExposureSettingsIndicatorWidget().setIconByMode(PROGRAM, getResources().getDrawable(R.drawable.ic_blue_program_mode));
List of the customization APIs
-
public void setCameraSettingsMenuIndicatorWidgetVisibility(boolean isVisible)
- Set the visibility of the camera settings menu indicator -
public boolean isCameraSettingsMenuIndicatorWidgetVisible()
- Get if camera settings menu indicator visible -
@NonNull public CameraSettingsMenuIndicatorWidget getCameraSettingsMenuIndicatorWidget()
- Get the camera settings menu indicator widget -
public void setPhotoVideoSwitchWidgetVisibility(boolean isVisible)
- Set the visibility of the photo video switch widget -
public boolean isPhotoVideoSwitchWidgetVisible()
- Get if photo video switch is visbile -
@NonNull public PhotoVideoSwitchWidget getPhotoVideoSwitchWidget()
- Get the photo video switch widget -
public void setCameraCaptureWidgetVisibility(boolean isVisible)
- Set the visibility of the camera capture widget -
public boolean isCameraCaptureWidgetVisible()
- Get if the camera capture widget is visible -
@NonNull public CameraCaptureWidget getCameraCaptureWidget()
- Get the camera capture widget -
public void setExposureSettingsIndicatorWidgetVisibility(boolean isVisible)
- Set the visibility of the exposure settings indicator widget -
public boolean isExposureSettingsIndicatorWidgetVisible()
- Get if the exposure settings indicator widget is visible -
@NonNull public ExposureSettingsIndicatorWidget getExposureSettingsIndicatorWidget()
- Get the exposure settings indicator widget
DJI UX SDK Version 5 Beta 5
UX SDK 5.0 Overview
Core Module
Camera Core Module
Visual Cameras Module
- Camera Config