[FREE] Image List Viewer Extension - A Fully Customizable List View with Title, Subtitle, Image and Checkbox

ImageListViewer

An extension for MIT App Inventor 2.
An extension to create a fully customisable list view with image, title and subtitle. Developed by The K Studio.

:memo: Specifications


:floppy_disk: Size: 26.85 KB
:iphone: Minimum API Level: 7
:date: Updated On: 2025-02-19T18:30:00Z
:computer: Built & documented using: FAST-CLI

Events:

ImageListViewer has total 6 events.

:yellow_heart: OnCheckboxChanged

OnCheckboxChangedBlock

Event triggered when a checkbox is checked or unchecked.

Parameter Type
currentItem number
checkedItems list

:yellow_heart: ReachBottom

ReachBottomBlock

Event raised when the list view reaches the bottom.

:yellow_heart: ReachTop

ReachTopBlock

Event raised when the list view reaches the top.

:yellow_heart: AfterPicking

AfterPickingBlock

Event raised after an item is picked from the list

Parameter Type
title text
subTitle text
image text
index number

:yellow_heart: LongClick

LongClickBlock

Event raised when a list item is long-clicked

Parameter Type
title text
subTitle text
image text
index number

:yellow_heart: OnError

OnErrorBlock

Event raised when an error occurs

Parameter Type
errorMessage text

Methods:

ImageListViewer has total 17 methods.

:purple_heart: Initialize

InitializeBlock

Initialize the ListView in the given Android view component for eg. Vertical Arrangement.

Parameter Type
component component

:purple_heart: AddItem

AddItemBlock

Add an item with its associated image and subitem to the List

Parameter Type
title text
subTitle text
image text

:purple_heart: RemoveAt

RemoveAtBlock

Remove an item from the List at the given index

Parameter Type
index number

:purple_heart: UpdateAt

UpdateAtBlock

Update an item at the given index in the List

Parameter Type
index number
newTitle text
newSubTitle text
newImage text

:purple_heart: SmoothScrollTo

SmoothScrollToBlock

Smoothly scroll the ListView to the specified position

Parameter Type
position number

:purple_heart: ClearList

ClearListBlock

Clear all items from the List

:purple_heart: SetList

SetListBlock

Set the list items with titles, subtitles, and images. Set empty list if not required.

Parameter Type
titleList list
subTitleList list
imageList list

:purple_heart: FilterList

FilterListBlock

Filter list items based on the provided search text

Parameter Type
keyword text
caseSensitive boolean

:purple_heart: Enable

EnableBlock

Enable the ListView, allowing item and checkbox selection.

:purple_heart: Disable

DisableBlock

Disable the ListView, preventing item and checkbox selection.

:purple_heart: IsEnabled

IsEnabledBlock

Check if the ListView is enabled.

:purple_heart: GetCheckedItems

GetCheckedItemsBlock

Get the list of checked item indices

:purple_heart: CheckAll

CheckAllBlock

Check all checkboxes

:purple_heart: UncheckAll

UncheckAllBlock

Uncheck all checkboxes

:purple_heart: CheckAt

CheckAtBlock

Check checkbox at the specified position (1-based index)

Parameter Type
position number

:purple_heart: UncheckAt

UncheckAtBlock

Uncheck checkbox at the specified position (1-based index)

Parameter Type
position number

:purple_heart: IsChecked

IsCheckedBlock

Check if the item at the given index is checked.

Parameter Type
index number

Setter Properties:

ImageListViewer has total 31 designer properties.

:green_apple: CheckboxColor

CheckboxColorBlock

  • Input type: color
  • Default value: &HFF000000

:green_apple: CheckboxVisible

CheckboxVisibleBlock

  • Input type: boolean
  • Default value: False

:green_apple: ImageSize

ImageSizeBlock

  • Input type: integer
  • Default value: 120

:green_apple: TitleFontSize

TitleFontSizeBlock

  • Input type: integer
  • Default value: 16

:green_apple: SubtitleFontSize

SubtitleFontSizeBlock

  • Input type: integer
  • Default value: 14

:green_apple: TitleColor

TitleColorBlock

  • Input type: color
  • Default value: &HFF000000

:green_apple: SubtitleColor

SubtitleColorBlock

  • Input type: color
  • Default value: &HFF808080

:green_apple: TitleBold

TitleBoldBlock

  • Input type: boolean
  • Default value: false

:green_apple: SubtitleBold

SubtitleBoldBlock

  • Input type: boolean
  • Default value: false

:green_apple: TitleHTML

TitleHTMLBlock

  • Input type: boolean
  • Default value: false

:green_apple: TextAlignment

TextAlignmentBlock

  • Input type: choices
  • Default value: left
  • Arguments: left, center, right

:green_apple: SubtitleHTML

SubtitleHTMLBlock

  • Input type: boolean
  • Default value: false

:green_apple: DividerColor

DividerColorBlock

  • Input type: color
  • Default value: &HFFFFFFFFF

:green_apple: DividerHeight

DividerHeightBlock

  • Input type: integer
  • Default value: 1

:green_apple: Scrollbar

ScrollbarBlock

  • Input type: boolean
  • Default value: false

:green_apple: ScrollbarColor

ScrollbarColorBlock

  • Input type: color
  • Default value: &HFF808080

:green_apple: FontTypeface

FontTypefaceBlock

  • Input type: asset

:green_apple: ListPaddings

ListPaddingsBlock

  • Input type: string
  • Default value: 10,10,10,10

:green_apple: ImagePaddings

ImagePaddingsBlock

  • Input type: string
  • Default value: 20,20,20,20

:green_apple: TitlePaddings

TitlePaddingsBlock

  • Input type: string
  • Default value: 10,10,10,5

:green_apple: SubtitlePaddings

SubtitlePaddingsBlock

  • Input type: string
  • Default value: 10,5,10,10

:green_apple: ImageSide

ImageSideBlock

  • Input type: choices
  • Default value: left
  • Arguments: left, right

:green_apple: CornerRadius

CornerRadiusBlock

  • Input type: integer
  • Default value: 0

:green_apple: Elevation

ElevationBlock

  • Input type: integer
  • Default value: 0

:green_apple: BackgroundColor

BackgroundColorBlock

  • Input type: color
  • Default value: &HFFFFFFFF

:green_apple: TouchFeedbackColor

TouchFeedbackColorBlock

  • Input type: color
  • Default value: &HFF808080

:green_apple: TouchFeedback

TouchFeedbackBlock

  • Input type: boolean
  • Default value: true

:green_apple: TitleMaxLines

TitleMaxLinesBlock

  • Input type: integer
  • Default value: 1

:green_apple: SubtitleMaxLines

SubtitleMaxLinesBlock

  • Input type: integer
  • Default value: 3

:green_apple: SubTitleVisible

SubTitleVisibleBlock

  • Input type: boolean
  • Default value: true

:green_apple: ReverseList

ReverseListBlock

  • Input type: boolean
  • Default value: false

Getters:

ImageListViewer has total 7 getter properties.

:green_circle: GetTitles

GetTitlesBlock

Get the items in the ListView.

  • Return type: any

:green_circle: GetSubTitles

GetSubTitlesBlock

Get the items in the ListView.

  • Return type: any

:green_circle: GetImages

GetImagesBlock

Get the image file paths in the ListView.

  • Return type: any

:green_circle: SelectedTitle

SelectedTitleBlock

Get the selected title after picking a list item

  • Return type: text

:green_circle: SelectedSubTitle

SelectedSubTitleBlock

Get the selected subtitle after picking a list item

  • Return type: text

:green_circle: SelectedImage

SelectedImageBlock

Get the selected image after picking a list item

  • Return type: text

:green_circle: SelectedIndex

SelectedImageBlock

Get the selected index after picking a list item

  • Return type: number

Explanation and Usage:


Initializes the list view in an arrangement like vertical arrangement. First initialize the list view before creating list view.


Add a single list item with title, sub title and image. You can also use loop the add multiple items to the list.


Set the list items at a time from the list of titles, subtitles and images.


Removes the list items at specified index.


Update the list item at specified index.


Smooth scroll to the specified position, here position is index.


Clears the list view


Filters the list with keyword and case sensitivity control.


Returns the currently set list of titles, subtitles and images.


Returns the selected title, subtitle, image and index.

Note: Index starts from 1


Set the padding of list view item, title, subtitle and image.
Set the padding as string of comma separated integers which represent padding as LEFT, TOP, RIGHT, BOTTOM

Other setter properties are self explanatory.

Preview:

Download:

V.7 com.thekstudio.imagelistviewer.aix (26.8 KB)

Note: Image will not be shown while loading from assets and testing in companion (you may use absolute path of the image from companion assets just for testing in companion or use online image when testing).

13 Likes

Very nice :slight_smile:

Does it have async for images built-in ?

Same sort of question, what happens with loading of very long lists ?

2 Likes

Yes! As my previous extension was Async image loader, same i have utilised in this to load images async.

The SetList function also works async! I tried to load 10k list items at a time using SetList function and worked fine. I am sure that this can handle even more.

1 Like

which function make the image align right? imagePadding?

==edit==
it should be ImageSide.

Yes, image side property will adjust the placement of image either left or right.

Hi, Do you have Video for this extension Usage? i am getting error "No vertual method setVerticalScrollbarThumbDrawable(Landroid/graphics/drawable/Drawable;)V in Class .....

Hi,

Sample blocks and usage described in main topic, also check test aia provided. Show us your blocks.


Just i run your Aia File and gor the run time error, Please help me, i want your ListView

I have just tested the aia, working fine with companion 2.70 on Android 13.

Ensure you put an image called icon.png in your assets (so that you see an image).

What android version / companion version are you using ?

1 Like

V2. Updated

  1. Now you can load image from online sources as well along with local storage and assets. If image path starts from http or https then it will load from online source, if image path starts from /storage then it will load from local storage (specify the full path of the file) else it will load from assets (specify the asset file name, eg., icon.png)

  2. Added new events: Reach bottom and reach top.

Developer Please Help me, i upload the icon.png file as well but that is not the problem. i still getting the error when running


My android version 8.1

Are you testing on Companion or Apk? Can you share test Apk?

V3 Updated:

  1. Fixed runtime error bug on Android version < 10.
  2. Added checkbox to the list view.

Blocks:

Preview:

2 Likes

Really helpful extension congrats!

Is it possible to display checkboxes also on the left side of the text instead of on the right side?

No, checkbox position is fixed to right.
Image can be placed either left or right.

maybe you want to try CompCreator extension to make any layout you want.

hey help what to do to view image? I can't see the image I put

Explain. Do you mean in the listview, or do you want to view a bigger version of the image on making a selection in the listview ?

no Like how to see the image that I added to the list I already added the image to the media and the name is correct but still I can't see the image

Show your relevant blocks