DJI Mobile SDK Documentation

      class ListItemData

      @Keep
      class ListItemData
      Package:dji.open.pilot.base.ui.model
      Description:

      List item data model, describing the content of a single item in a VERTICAL_LIST_VIEW. It is transmitted between the Client and Server via Gson serialization/deserialization.

      Supported since MSDK 5.20.1

      Class Members:
      property
      property itemId
      private String itemId
      Package:dji.open.pilot.base.ui.model
      Description:

      Unique item identifier.

      Supported since MSDK 5.20.1

      property
      property type
      private ListItemType type
      Package:dji.open.pilot.base.ui.model
      Description:

      Item type.

      Supported since MSDK 5.20.1

      See Also:

      ListItemType

      property
      property title
      private String title
      Package:dji.open.pilot.base.ui.model
      Description:

      Title text.

      Supported since MSDK 5.20.1

      property
      property subtitle
      private String subtitle
      Package:dji.open.pilot.base.ui.model
      Description:

      Subtitle text (valid only for the ICON_TWO_LINE type).

      Supported since MSDK 5.20.1

      property
      property iconFileName
      private String iconFileName
      Package:dji.open.pilot.base.ui.model
      Description:

      Icon file name (must be stored in the plugin’s external storage directory).

      Supported since MSDK 5.20.1

      property
      property titleColor
      private String titleColor
      Package:dji.open.pilot.base.ui.model
      Description:

      Title color (“#RRGGBB” or “#AARRGGBB” format string); an empty string means the default color is used.

      Supported since MSDK 5.20.1

      property subtitleColor
      private String subtitleColor
      Package:dji.open.pilot.base.ui.model
      Description:

      Subtitle color.

      Supported since MSDK 5.20.1

      property
      property showDivider
      private boolean showDivider
      Package:dji.open.pilot.base.ui.model
      Description:

      Whether to show the divider below this item (default true).

      Supported since MSDK 5.20.1

      property
      property iconSize
      private int iconSize
      Package:dji.open.pilot.base.ui.model
      Description:

      The side length of the square icon (dp), default 24.

      Supported since MSDK 5.20.1

      property iconMarginEnd
      private int iconMarginEnd
      Package:dji.open.pilot.base.ui.model
      Description:

      The right margin of the icon (dp), default 8.

      Supported since MSDK 5.20.1

      property
      property titleSize
      private float titleSize
      Package:dji.open.pilot.base.ui.model
      Description:

      Title font size (sp); 0 means the default value is used.

      Supported since MSDK 5.20.1

      property
      property subtitleSize
      private float subtitleSize
      Package:dji.open.pilot.base.ui.model
      Description:

      Subtitle font size (sp); 0 means the default value is used.

      Supported since MSDK 5.20.1

      method
      method text
      @NonNull
      static ListItemData text(@NonNull String itemId, @NonNull String title)
      Package:dji.open.pilot.base.ui.model
      Description:

      Creates a plain text type item.

      Supported since MSDK 5.20.1

      Input Parameters:
      @NonNull String itemIdUnique item identifier.
      @NonNull String titleTitle text.
      Return:
      static ListItemDataThe created ListItemData instance.
      method
      method iconText
      @NonNull
      static ListItemData iconText(@NonNull String itemId, @NonNull String iconFileName, @NonNull String title)
      Package:dji.open.pilot.base.ui.model
      Description:

      Creates an icon + title type item.

      Supported since MSDK 5.20.1

      Input Parameters:
      @NonNull String itemIdUnique item identifier.
      @NonNull String iconFileNameIcon file name.
      @NonNull String titleTitle text.
      Return:
      static ListItemDataThe created ListItemData instance.
      method iconTwoLine
      @NonNull
      static ListItemData iconTwoLine(@NonNull String itemId, @NonNull String iconFileName,
      @NonNull String title, @NonNull String subtitle)
      Package:dji.open.pilot.base.ui.model
      Description:

      Creates an icon + two-line text type item.

      Supported since MSDK 5.20.1

      Input Parameters:
      @NonNull String itemIdUnique item identifier.
      @NonNull String iconFileNameIcon file name.
      @NonNull String titleTitle text.
      @NonNull String subtitleSubtitle text.
      Return:
      static ListItemDataThe created ListItemData instance.