Skip to content

Camera Controls Widget

siddutgikar edited this page May 12, 2020 · 2 revisions

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.

Usage

<dji.ux.beta.cameracore.widget.cameracontrols.CameraControlsWidget
     android:id="@+id/widget_camera_controls"
     android:layout_width="50dp"
     android:layout_height="200dp"/>

Customizations

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));

APIs

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

Clone this wiki locally