Skip to content

Camera Config ISO and EI Widget

Siddharth Utgikar edited this page Feb 26, 2021 · 2 revisions

(Updated widget in develop branch)

Camera Config Shutter Speed Widget shows the camera's current ISO or exposure index(EI) setting. EI value is displayed in place of ISO only when EI mode is supported by the camera and is enabled.

ISO value when ISO has been set to AUTO

ISO value set manually

EI value set manually

Usage

<dji.ux.beta.visualcamera.widget.cameraconfig.iso.CameraConfigISOAndEIWidget
        android:id="@+id/widget_camera_config_iso_and_ei"
        android:layout_width="wrap_content"
        android:layout_height="50dp" />

Customizations

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

Example

<dji.ux.beta.visualcamera.widget.cameraconfig.iso.CameraConfigISOAndEIWidget
        android:id="@+id/widget_camera_config_iso_and_ei"
        android:layout_width="wrap_content"
        android:layout_height="50dp"
        android:background="@color/white"
        app:uxsdk_isoAndEITitleTextColor="@color/black"
        app:uxsdk_isoAndEIValueTextColor="@color/uxsdk_red" />

Java Example

CameraConfigISOAndEIWidget cameraConfigISOAndEIWidget = findViewById(R.id.widget_camera_config_iso_and_ei);
cameraConfigISOAndEIWidget.setBackgroundColor(getResources().getColor(R.color.white));
cameraConfigISOAndEIWidget.setISOAndEITitleTextColor(getResources().getColor(R.color.black));
cameraConfigISOAndEIWidget.setISOAndEIValueTextColor(getResources().getColor(R.color.uxsdk_red));

Attributes

List of the customizable XML attributes
  • uxsdk_cameraIndex - The camera index to which the widget should react.
  • uxsdk_isoAndEITitleTextAppearance - The text appearance of the title.
  • uxsdk_isoAndEITitleTextSize - The text size of the title.
  • uxsdk_isoAndEITitleTextColor - The text color of the title.
  • uxsdk_isoAndEITitleBackgroundDrawable - The background of the title.
  • uxsdk_isoAndEIValueTextAppearance - The text appearance of the value.
  • uxsdk_isoAndEIValueTextSize - The text size of the value.
  • uxsdk_isoAndEIValueTextColor - The text color of the value.
  • uxsdk_isoAndEIValueBackgroundDrawable - The background of the value.

APIs

List of the customization APIs
  • void setCameraIndex(@NonNull SettingDefinitions.CameraIndex cameraIndex) - Set the camera index to which the widget should react.
  • @NonNull public SettingDefinitions.CameraIndex getCameraIndex() - Get the camera index to which the widget is reacting
  • public void setISOAndEITitleTextAppearance(@StyleRes int textAppearance) - Set the appearance of title text.
  • public void setISOAndEITitleTextColor(@NonNull ColorStateList colorStateList) - Set the color state list of the title text.
  • @NonNull public ColorStateList getISOAndEITitleTextColors() - Get the color state list of the title text.
  • public void setISOAndEITitleTextColor(@ColorInt int color) - Set the color of the title text.
  • @ColorInt public int getISOAndEITitleTextColor() - Get the color of the title text.
  • public void setISOAndEITitleTextSize(@Dimension float textSize) - Set the size of the title text.
  • @Dimension public float getISOAndEITitleTextSize() - Get the current size of the title text.
  • public void setTitleBackground(@DrawableRes int resourceId) - Set the background of the title text.
  • public void setISOAndEITitleTextBackground(@Nullable Drawable drawable) - Set the background of the title text.
  • @Nullable public Drawable getISOAndEITitleTextBackground() - Get the background of the title text.
  • public void setISOAndEIValueTextAppearance(@StyleRes int textAppearance) - Set the appearance of value text.
  • public void setISOAndEIValueTextColor(@NonNull ColorStateList colorStateList) - Set the color state list of the value text.
  • @NonNull public ColorStateList getISOAndEIValueTextColors() - Get the color state list of the value text.
  • public void setISOAndEIValueTextColor(@ColorInt int color) - Set the color of the value text.
  • @ColorInt public int getISOAndEIValueTextColor() - Get the color of the value text.
  • public void setISOAndEIValueTextSize(@Dimension float textSize) - Set the size of the value text.
  • @Dimension public float getISOAndEIValueTextSize() - Get the current size of the value text.
  • public void setISOAndEIValueTextBackground(@DrawableRes int resourceId) - Set the background of the value text.
  • public void setISOAndEIValueTextBackground(@Nullable Drawable drawable) - Set the background of the value text.
  • @Nullable public Drawable getISOAndEIValueTextBackground() - Get the background of the value text.
Clone this wiki locally