I did this separately for an extension I'm doing for a color selector with seekbars, I needed a horizontal list in circles and this came out, I know it could look better, but for now I'll leave it here.
- SetListItems(itemList)
- itemList: List of items (
YailList
) to set in the list.
- itemList: List of items (
- AddListItem(item)
- item: Text string representing the new item to add to the list.
- RemoveListItem(index)
- index: Integer index of the item to remove from the list.
- UpdateListItem(index, newItem)
- index: Integer index of the item to update in the list.
- newItem: Text string representing the new value of the updated item.
- SortListItems()
- AttachToView(viewComponent)
- viewComponent: Visual component (
AndroidViewComponent
) to which the list view should be attached.
- viewComponent: Visual component (
- SetScrollBarVisible(visible)
- visible: Boolean value (
true
orfalse
) indicating whether to set the visibility of the list scroll bar.
- visible: Boolean value (
- SetListBackgroundColor(color)
- color: Text string representing the background color of the entire list in
#RRGGBB
or#AARRGGBB
format.
- color: Text string representing the background color of the entire list in
- SetItemTextColor(color)
- color: Text string representing the text color of the list items in
#RRGGBB
or#AARRGGBB
format.
- color: Text string representing the text color of the list items in
- SetListItemBackgroundColor(index, color)
- index: Integer index of the item to change the background color.
- color: Text string representing the background color of the item in
#RRGGBB
or#AARRGGBB
format.
- SetAllItemsBackgroundColor(color)
- color: Text string representing the background color of all items in the list in
#RRGGBB
or#AARRGGBB
format.
- color: Text string representing the background color of all items in the list in
- SetListItemCornerRadius(index, radius)
- index: Integer index of the item to set the corner radius.
- radius: Integer value representing the corner radius of the item.
- SetListItemTextColor(index, color)
- index: Integer index of the item to change the text color.
- color: Text string representing the text color of the item in
#RRGGBB
or#AARRGGBB
format.
- SetListItemSize(index, width, height)
- index: Integer index of the item to set the size.
- width: Integer value representing the width of the item.
- height: Integer value representing the height of the item.
- SetAllItemSize(width, height)
- width: Integer value representing the width of all items in the list.
- height: Integer value representing the height of all items in the list.
- SetDividerColor(color)
- color: Text string representing the color of the divider lines between items in
#RRGGBB
or#AARRGGBB
format.
- color: Text string representing the color of the divider lines between items in
- SetHorizontal(horizontal)
- horizontal: Boolean value (
true
orfalse
) indicating whether to set the list in horizontal mode.
- horizontal: Boolean value (
- ItemCount()
- ItemClicked(index)
- index: Integer index of the item that was clicked.
- ItemLongClicked(index)
- index: Integer index of the item that was long-clicked.
Screenshots:
The one below is the one I made this extension for:
aia project:
CustomListViewer.aia (25.3 KB)
Extension:
JoeDevListViewer.aix (17.5 KB)
Thanks.