Skip to content

Camera Config SSD Widget

siddutgikar edited this page May 12, 2020 · 2 revisions

Shows the camera's current capacity and other information for the SSD storage. Currently supported only by Inspire 2.

The following image displays the information the widget displays in Video Mode.

The following image displays the information the widget displays in Photo Mode.

The following images display the various states of the widget.

Usage

<dji.ux.beta.visualcamera.widget.cameraconfig.ssd.CameraConfigSSDWidget
        android:id="@+id/widget_camera_config_ssd"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/camera_config_height"/>

Customizations

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

Example

<dji.ux.beta.visualcamera.widget.cameraconfig.ssd.CameraConfigSSDWidget
        android:id="@+id/widget_camera_config_ssd"
        android:layout_width="wrap_content"
        android:layout_height="@dimen/camera_config_height"
        android:background="@color/white"
        app:uxsdk_capacityValueTextColor="@color/black"
        app:uxsdk_capacityOrLicenseTextColor="@color/blue"
        app:uxsdk_imageFormatTextColor="@color/green"
        app:uxsdk_ssdClipInfoTextColor="@color/uxsdk_red"/>

Java Example

CameraConfigSSDWidget cameraConfigSSDWidget = findViewById(R.id.widget_camera_config_ssd);
cameraConfigSSDWidget.setBackgroundColor(getResources().getColor(R.color.white));
cameraConfigSSDWidget.setCapacityValueTextColor(getResources().getColor(R.color.black));
cameraConfigSSDWidget.setCapacityOrLicense(getResources().getColor(R.color.blue));
cameraConfigSSDWidget.setImageFormatTextColor(getResources().getColor(R.color.green));
cameraConfigSSDWidget.setSSDClipInfoTextColor(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_ssdClipInfoTextAppearance - The appearance of the SSD clip info text.
  • uxsdk_ssdClipInfoTextSize - The size of the SSD clip info text.
  • uxsdk_ssdClipInfoTextColor - The color of the SSD clip info text.
  • uxsdk_ssdClipInfoTextBackground - The background of the SSD clip info text.
  • uxsdk_capacityOrLicenseTextAppearance - The appearance of the capacity or license text.
  • uxsdk_capacityOrLicenseTextSize - The size of the capacity or license text.
  • uxsdk_capacityOrLicenseTextColor - The color of the capacity or license text .
  • uxsdk_capacityOrLicenseTextBackground - The background of the capacity or license text.
  • uxsdk_statusInfoTextAppearance - The appearance of the status info text.
  • uxsdk_statusInfoTextSize - The color of the status info text.
  • uxsdk_statusInfoTextColor - The background of status info text.
  • uxsdk_statusInfoTextBackground - The size of the status info text.
  • uxsdk_imageFormatTextAppearance - The appearance of the image format text.
  • uxsdk_imageFormatTextSize - The size of the image format text.
  • uxsdk_imageFormatTextColor - The color of the image format text.
  • uxsdk_imageFormatTextBackground - The background of the image format text.
  • uxsdk_capacityTextAppearance - The appearance of the storage capacity text.
  • uxsdk_capacityTextColor - The color of the storage capacity text.
  • uxsdk_capacityTextBackground - The background of the storage capacity text.
  • uxsdk_capacityTextSize - The size of the storage capacity text.
  • uxsdk_capacityValueTextAppearance - The appearance of the storage capacity value text.
  • uxsdk_capacityValueTextSize - The size of the storage capacity value text.
  • uxsdk_capacityValueTextColor - The color of the storage capacity value text.
  • uxsdk_capacityValueTextBackground - The background of the storage capacity value text.
  • uxsdk_ssdStatusIcon - The SSD status icon.
  • uxsdk_ssdNotFoundIcon - The SSD not found icon.
  • uxsdk_ssdUnknownIcon - The SSD unkown icon.
  • uxsdk_ssdIdleIcon - The SSD idle icon.
  • uxsdk_ssdSavingIcon - The SSD saving icon.
  • uxsdk_ssdFormattingIcon - The SSD formatting icon.
  • uxsdk_ssdInitializingIcon - The SSD initializing icon.
  • uxsdk_ssdErrorIcon - The SSD error icon.
  • uxsdk_ssdFullIcon - The SSD full icon.
  • uxsdk_ssdPoorConnectionIcon - The SSD poor connection icon.
  • uxsdk_ssdSwitchingLicenseIcon - The SSD switching license icon.
  • uxsdk_ssdFormattingRequiredIcon - The SSD formatting required icon.

APIs

List of the customization APIs
  • public 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 setSSDClipInfoTextAppearance(@StyleRes int textAppearance) - Set the appearance of SSD Clip Info text.

  • public void setSSDClipInfoTextColor(@NonNull ColorStateList colorStateList) - Set the color state list of SSD Clip Info text.

  • public void setSSDClipInfoTextColor(@ColorInt int color) - Set the color of SSD Clip Info text.

  • @Nullable public ColorStateList getSSDClipInfoTextColors() - Get the color state list of SSD Clip Info text.

  • @ColorInt public int getSSDClipInfoTextColor() - Get the color of SSD Clip Info text.

  • public void setSSDClipInfoTextSize(@Dimension float textSize) - Set the size of the SSD Clip Info text.

  • @Dimension public float getSSDClipInfoTextSize() - Get the size of the SSD Clip Info text.

  • public void setSSDClipInfoTextBackground(@DrawableRes int resourceId) - Set the background to the SSD Clip Info text.

  • public void setSSDClipInfoTextBackground(@Nullable Drawable drawable) - Set the background to the SSD Clip Info text.

  • @Nullable public Drawable getSSDClipInfoTextBackground() - Get the background to the SSD Clip Info text.

  • public void setSSDCapacityOrLicenseTextAppearance(@StyleRes int textAppearance) - Set the appearance of SSD Capacity Or License text.

  • public void setSSDCapacityOrLicenseTextColor(@NonNull ColorStateList colorStateList) - Set the color state list of SSD Capacity Or License text.

  • public void setSSDCapacityOrLicenseTextColor(@ColorInt int color) - Set the color of SSD Capacity Or License text.

  • @Nullable public ColorStateList getSSDCapacityOrLicenseTextColors() - Get the color state list of SSD Capacity Or License text.

  • @ColorInt public int getSSDCapacityOrLicenseTextColor() - Get the color of SSD Capacity Or License text.

  • public void setSSDCapacityOrLicenseTextSize(@Dimension float textSize) - Set the size of the SSD Capacity Or License text.

  • @Dimension public float getSSDCapacityOrLicenseTextSize() - Get the size of the SSD Capacity Or License text.

  • public void setSSDCapacityOrLicenseTextBackground(@DrawableRes int resourceId) - Set the background to the SSD Capacity Or License text.

  • public void setSSDCapacityOrLicenseTextBackground(@Nullable Drawable drawable) - Set the background to the SSD Capacity Or License text.

  • @Nullable public Drawable getSSDCapacityOrLicenseTextBackground() - Get the background to the SSD Capacity Or License text.

  • public void setStatusInfoTextAppearance(@StyleRes int textAppearance) - Set the appearance of status info text.

  • public void setStatusInfoTextColor(@NonNull ColorStateList colorStateList) - Set the color state list of status info text.

  • public void setStatusInfoTextColor(@ColorInt int color) - Set the color of status info text.

  • @Nullable public ColorStateList getStatusInfoTextColors() - Get the color state list of status info text.

  • @ColorInt public int getStatusInfoTextColor() - Get the color of status info text.

  • public void setStatusInfoTextSize(@Dimension float textSize) - Set the size of the status info text.

  • @Dimension public float getStatusInfoTextSize() - Get the size of the status info text.

  • public void setStatusInfoTextBackground(@DrawableRes int resourceId) - Set the background to the status info text.

  • public void setStatusInfoTextBackground(@Nullable Drawable drawable) - Set the background to the status info text.

  • @Nullable public Drawable getStatusInfoTextBackground() - Get the background to the status info text.

  • public void setFormatInfoTextAppearance(@StyleRes int textAppearance) - Set the appearance of SSD format info text.

  • public void setFormatInfoTextColor(@NonNull ColorStateList colorStateList) - Set the color state list of SSD format info text.

  • public void setFormatInfoTextColor(@ColorInt int color) - Set the color of SSD format info text.

  • @Nullable public ColorStateList getFormatInfoTextColors() - Get the color state list of SSD format info text.

  • @ColorInt public int getFormatInfoTextColor() - Get the color of SSD format info text.

  • public void setFormatInfoTextSize(@Dimension float textSize) - Set the size of the SSD format info text.

  • @Dimension public float getFormatInfoTextSize() - Get the size of the SSD format info text.

  • public void setFormatInfoTextBackground(@DrawableRes int resourceId) - Set the background to the SSD format info text.

  • public void setFormatInfoTextBackground(@Nullable Drawable drawable) - Set the background to the SSD format info text.

  • @Nullable public Drawable getFormatInfoTextBackground() - Get the background to the SSD format info text.

  • public void setSSDCapacityValueTextAppearance(@StyleRes int textAppearance) - Set the appearance of SSD capacity value text.

  • public void setSSDCapacityValueTextColor(@NonNull ColorStateList colorStateList) - Set the color state list of SSD capacity value text.

  • public void setSSDCapacityValueTextColor(@ColorInt int color) - Set the color of SSD capacity value text.

  • @Nullable public ColorStateList getSSDCapacityValueTextColors() - Get the color state list of SSD capacity value text.

  • @ColorInt public int getSSDCapacityValueTextColor() - Get the color of SSD capacity value text.

  • public void setSSDCapacityValueTextSize(@Dimension float textSize) - Set the size of the SSD capacity value text.

  • @Dimension public float getSSDCapacityValueTextSize() - Get the size of the SSD capacity value text.

  • public void setSSDCapacityValueTextBackground(@DrawableRes int resourceId) - Set the background to the SSD capacity value text.

  • public void setSSDCapacityValueTextBackground(@Nullable Drawable drawable) - Set the background to the SSD capacity value text.

  • @Nullable public Drawable getSSDCapacityValueTextBackground() - Get the background to the SSD capacity value text.

  • public void setSSDStatusIcon(@DrawableRes int resourceId) - Set the SSD status icon resource.

  • public void setSSDStatusIcon(@NonNull Drawable icon) - Set the SSD status icon drawable.

  • @NonNull public Drawable getSSDStatusIcon() - Get the SSD status icon.

  • public void setSSDStatusIconBackground(@DrawableRes int resourceId) - Set the SSD status icon background resource.

  • public void setSSDStatusIconBackground(@Nullable Drawable background) - Set the SSD status icon background drawable.

  • @Nullable public Drawable getSSDStatusIconBackground() - Get the SSD status icon background.

  • public void setSSDIcon(@NonNull SSDOperationState state, @DrawableRes int resourceId) - Set the SSD icon resource based on SSD Operation State.

  • public void setSSDIcon(@NonNull SSDOperationState state, @Nullable Drawable drawable) - Set the SSD icon drawable based on SSD Operation State.

  • @Nullable public Drawable getSSDIcon(@NonNull SSDOperationState state) - Get the SSD icon based on SSD Operation State.

  • public void setSSDIconBackground(@DrawableRes int resourceId) - Set the SSD icon background resource.

  • public void setSSDIconBackground(@Nullable Drawable background) - Set the SSD icon background drawable.

  • @Nullable public Drawable getSSDIconBackground() - Get the SSD icon background.

Clone this wiki locally