Skip to content

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

Usage

<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"/>

Customizations

The widget can be customized by the user to serve their purpose and theme.

Example

<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"/>

Java Example

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));
/images/widgets/cameracontrols/camerasettingsmenuindicator/ic_custom_menu.png

Attributes

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

APIs

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
Clone this wiki locally