-
Notifications
You must be signed in to change notification settings - Fork 54
List Item Edit Text Button Widget
The widget is an extension of the List Item Title Widget. The primary purpose of this widget is to accept inputs from user and enable user interaction.
abstract class ListItemEditTextButtonWidget<T> @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0,
val widgetType: WidgetType
) : ListItemTitleWidget<T>(context, attrs, defStyleAttr)
The WidgetType supports two values:
It inherits the title icon and title text and its customizations from the List Item Title Widget. Additionally it provides an edit text to enter value and a label to show hint. The widget supports all the edit text customizations and hint customizations mentioned below.
Example of the widget is Max Altitude List Item Widget
It inherits the title icon and title text and its customizations from the List Item Title Widget. Additionally it provides an edit text to enter value, a label to show hint and a button for user interaction. The widget supports all the edit text customizations, hint customizations and button customizations mentioned below.
Example of the widget is Max Flight Distance List Item Widget
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.
List of the customizable XML attributes
-
uxsdk_list_item_edit_text
- The string value for list item edit text. -
uxsdk_list_item_edit_text_size
- The size of the list item edit text. -
uxsdk_list_item_edit_text_color
- The color of the list item edit text. -
uxsdk_list_item_edit_appearance
- The appearance of the list item edit text. -
uxsdk_list_item_edit_background
- The background for the list item edit text. -
uxsdk_list_item_edit_visibility
- The visibility for the list item edit text. -
uxsdk_list_item_edit_enabled
- To enable/disable edit text.
List of the customization APIs
-
var listItemEditTextValue: String?
- The string value for list item edit text. -
var listItemEditTextSize: Float
- The text size of the list item edit text. -
var listItemEditTextColor: Int
- The text color of the list item edit text. -
var listItemEditTextColors: ColorStateList?
- The text color state list for the list item edit text. -
var listItemEditTextBackground: Drawable?
- The drawable background for the list item edit text. -
var listItemEditTextVisibility: Boolean
- The visibility for list item edit text. -
var listItemEditTextInputType: Int
- The input type to restrict the user input. -
fun setListItemEditTextBackground(@DrawableRes resourceId: Int)
- Set the background resource of the list item edit text. -
fun setListItemEditTextTextAppearance(@StyleRes textAppearanceResId: Int)
- Set the appearance of the list item label text.
List of the customizable XML attributes
-
uxsdk_list_item_hint
- The string value for list item hint label. -
uxsdk_list_item_hint_text_size
- The size of the list item hint label text. -
uxsdk_list_item_hint_text_color
- The color of the list item hint label text. -
uxsdk_list_item_hint_appearance
- The appearance of the list item hint label text. -
uxsdk_list_item_hint_background
- The background for the list item hint label. -
uxsdk_list_item_hint_visibility
- The visibility for the list item hint label.
List of the customization APIs
-
var listItemHint: String?
- The string value for list item hint label. -
var listItemHintTextSize: Float
- The text size of the list item hint label. -
var listItemHintTextColor: Int
- The text color of the list item hint label. -
var listItemHintTextColors: ColorStateList?
- The text color state list for the list item hint label. -
var listItemHintBackground: Drawable?
- The drawable background for the list item hint label. -
var listItemHintVisibility: Boolean
- The visibility for list item hint label. -
fun setListItemHintBackground(@DrawableRes resourceId: Int)
- Set the background resource of the list item hint label. -
fun setListItemHintTextAppearance(@StyleRes textAppearanceResId: Int)
- Set the appearance of the list item hint label text.
List of the customizable XML attributes
-
uxsdk_list_item_button_text
- The string to be displayed on the button. -
uxsdk_list_item_button_text_size
- The size of the text diplayed on the button. -
uxsdk_list_item_button_text_color
- The color of the text diplayed on the button. -
uxsdk_list_item_button_appearance
- The appearance of the text diplayed on the button. -
uxsdk_list_item_button_background
- The drawable background for the button. -
uxsdk_list_item_button_enabled
- To set the button functionality enabled/disabled. -
uxsdk_list_item_button_visibility
- The visibility of the button.
List of the customization APIs
-
var listItemButtonText: String?
- The string to be displayed on the button. -
var listItemButtonTextSize: Float
- The size of the text diplayed on the button. -
var listItemButtonTextColor: Int
- The color of the text diplayed on the button. -
var listItemButtonTextColors: ColorStateList?
- The color state list for the text diplayed on the button. -
var listItemButtonBackground: Drawable?
- The drawable background for the button. -
var listItemButtonEnabled: Boolean
- To set the button functionality enabled/disabled. -
var listItemButtonVisibility: Boolean
- The visibility of the button. -
fun setListItemButtonBackground(@DrawableRes resourceId: Int)
- Set the background resource for the button. -
fun setListItemButtonTextAppearance(@StyleRes textAppearanceResId: Int)
- Set the text apperance of the text displayed on the button.
DJI UX SDK Version 5 Beta 5
UX SDK 5.0 Overview
Core Module
Camera Core Module
Visual Cameras Module
- Camera Config