-
Notifications
You must be signed in to change notification settings - Fork 55
Focus Exposure Bar Panel Widget
(Widget in develop branch)
The Focus Exposure Bar Panel Widget is a specialized subclass of Bar Panel Widget configured to work in Horizontal orientation. It is provided to display the widgets to control focus and exposure settings of the camera. The bar panel provides an option to organize its child widgets into left side widgets and right side widgets. In the focus exposure bar panel widget, all the following items are organized as right side widgets:
Each of these widgets are configured to hide if the product is disconnected or does not support focus changing. The focus exposure bar panel is seen as below:
<dji.ux.beta.cameracore.panel.focusexposurebar.FocusExposureBarPanelWidget
android:id="@+id/widget_focus_exposure_panel"
android:layout_width="wrap_content"
android:layout_height="35dp" />
The UI elements can be customized to match the style of the user's application. The customizations can be done using attributes in XML or programmatically using the APIs. The widget supports all the customizations that its parent Bar Panel Widget supports. Individual elements of the panel can also be customized using a style.
<dji.ux.beta.cameracore.panel.focusexposurebar.FocusExposureBarPanelWidget
android:id="@+id/widget_focus_exposure_panel"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:background="@color/white"
android:theme="@style/FocusExposureTheme"/>
<style name="FocusExposureTheme">
<item name="uxsdk_inactiveModeTextColor">@color/black</item>
<item name="uxsdk_autoExposureLockIconColor">@color/black</item>
<item name="uxsdk_autoExposureLockTextColor">@color/black</item>
</style>
List of the customizable XML attributes
-
uxsdk_excludeFocusExposureBarItem
- The item that should be excluded from the focus exposure bar. The full list of flags that can be used to exclude widgets is as below:- focus_exposure_switch
- auto_exposure_lock
- focus_mode
Multiple items can be excluded using the pipe symbol. For example,
uxsdk_excludeFocusExposureBarItem = "focus_exposure_switch|focus_mode"
.
FocusExposureBarPanelWidget focusExposureBarPanelWidget = findViewById(R.id.widget_focus_exposure_panel);
focusExposureBarPanelWidget.setBackgroundColor(getResources().getColor(R.color.white));
focusExposureBarPanelWidget.getAutoExposureLockWidget().setBackground(null);
focusExposureBarPanelWidget.getAutoExposureLockWidget().setAutoExposureLockedTextColor(getResources().getColor(R.color.black));
focusExposureBarPanelWidget.getAutoExposureLockWidget().setAutoExposureLockIconColor(getResources().getColor(R.color.black));
focusExposureBarPanelWidget.getFocusExposureSwitchWidget().setBackground(null);
focusExposureBarPanelWidget.getFocusModeWidget().setBackground(null);
focusExposureBarPanelWidget.getFocusModeWidget().setInactiveModeTextColor(getResources().getColor(R.color.black));
val focusExposureBarPanelWidget = findViewById<FocusExposureBarPanelWidget>(R.id.widget_focus_exposure_panel)
focusExposureBarPanelWidget.setBackgroundColor(resources.getColor(R.color.white))
focusExposureBarPanelWidget.autoExposureLockWidget.background = null
focusExposureBarPanelWidget.autoExposureLockWidget.autoExposureLockedTextColor = resources.getColor(R.color.black)
focusExposureBarPanelWidget.autoExposureLockWidget.autoExposureLockIconColor = resources.getColor(R.color.black)
focusExposureBarPanelWidget.focusExposureSwitchWidget.background = null
focusExposureBarPanelWidget.focusModeWidget.background = null
focusExposureBarPanelWidget.focusModeWidget.inactiveModeTextColor = resources.getColor(R.color.black)
List of the customization APIs
-
val focusModeWidget: FocusModeWidget?
- Instance of Focus Mode Widget. Instance is null when excluded from the top bar panel. -
val focusExposureSwitchWidget: FocusExposureSwitchWidget?
- Instance of Focus Exposure Switch Widget. Instance is null when excluded from the top bar panel. -
val autoExposureLockWidget: AutoExposureLockWidget?
- Instance of Auto Exposure Lock Widget. Instance is null when excluded from the top bar panel.
DJI UX SDK Version 5 Beta 5
UX SDK 5.0 Overview
Core Module
Camera Core Module
Visual Cameras Module
- Camera Config