-
Notifications
You must be signed in to change notification settings - Fork 54
Camera Settings Menu Indicator Widget
siddutgikar edited this page May 12, 2020
·
2 revisions
The widget is a part of the Camera Controls Widget. Tapping on the widget can be used to open the camera settings menu panel.
/images/widgets/cameracontrols/camerasettingsmenuindicator/ic_menu.png
<dji.ux.beta.cameracore.widget.cameracontrols.camerasettingsindicator.CameraSettingsMenuIndicatorWidget
android:id="@+id/widget_camera_control_camera_settings_menu"
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.camerasettingsindicator.CameraSettingsMenuIndicatorWidget
android:id="@+id/widget_camera_control_camera_settings_menu"
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@color/white"
app:settingsTextColor="@color/blue"/>
CameraSettingsMenuIndicatorWidget cameraSettingsMenuIndicatorWidget = findViewById(R.id.widget_camera_control_camera_settings_menu);
cameraSettingsMenuIndicatorWidget.setBackgroundColor(getResources().getColor(R.color.white));
cameraSettingsMenuIndicatorWidget.setLabelTextColor(getResources().getColor(R.color.blue));
List of the customizable XML attributes
-
uxsdk_settingsTextBackground
- The background of the widget label text -
uxsdk_settingsTextSize
- The text size of widget label -
uxsdk_settingsTextColor
- The text color of widget label -
uxsdk_onStateChange
- The state change to react to on tap
List of the customization APIs
-
public void setLabelTextColor(@ColorInt int color)
- set the text color of the widget label -
@ColorInt public int getLabelTextColor()
- get the text color of the widget label -
public void setLabelTextBackground(@DrawableRes int resourceId)
- set the background of the widget label -
public void setLabelTextBackground(@Nullable Drawable drawable)
- set the background of the widget label -
@Nullable public Drawable getLabelBackground()
- get the background of the widget label -
public void setLabelTextSize(@Dimension float textSize)
- set the text size of widget label -
public float getLabelTextSize()
- get the text size of widget label -
public void setStateChangeCallback(@NonNull OnStateChangeCallback<Object> stateChangeCallback)
- set the state change call back
DJI UX SDK Version 5 Beta 5
UX SDK 5.0 Overview
Core Module
Camera Core Module
Visual Cameras Module
- Camera Config