# Titanium.UI.DashboardItem

A dashboard item is a view that is displayed as an icon in a Titanium.UI.DashboardView.

Availability
1.2
9.2.0

# Overview

A DashboardItem is created using the Titanium.UI.createDashboardItem method or <DashboardItem> Alloy element.

# Properties

# badge

Availability
1.2
9.2.0
badge :Number

Integer value displayed in a badge.

Set to 0 to reset and remove the badge.

Default: 0


# canDelete

Availability
1.2
9.2.0
canDelete :Boolean

Determines whether this item can be deleted when it edit mode.

Default: true


# image

Availability
1.2
9.2.0
image :String | Titanium.Blob

Image or path to image to display in the item by default.


# selectedImage

Availability
1.2
9.2.0
selectedImage :String | Titanium.Blob

Image or path to image to display in the item as it is selected.

# Events

# click

Availability
1.2
9.2.0

Fired when a click is detected against the view.

Properties

Name Type Description
location Point

Coordinates x and y of the event from the parent view's coordinate system.

item Titanium.UI.DashboardItem

Item that was clicked.

bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.


# delete

Availability
1.2
9.2.0

Fired when an item is deleted during editing mode.

Properties

Name Type Description
item Titanium.UI.DashboardItem

Item that was deleted.

bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.


# move

Availability
1.2
9.2.0

Fired when an item is moved during editing mode.

Properties

Name Type Description
items Array<Titanium.UI.DashboardItem>

List of items to be committed, possibly in new order, when edit mode ends.

item Titanium.UI.DashboardItem

Item that was moved.

bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.