[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.

Download:

v8.2 com.thekstudio.imagelistviewer.aix (29.6 KB)

:memo: Specifications


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

Events:

ImageListViewer has total 6 events.

OnCheckboxChanged

OnCheckboxChanged_Event

Event triggered when a checkbox is checked or unchecked.

Parameter Type
currentItem number
checkedItems list

ReachBottom

ReachBottomBlock

Event raised when the list view reaches the bottom.

ReachTop

ReachTopBlock

Event raised when the list view reaches the top.

AfterPicking

AfterPicking_Event

Event raised after an item is picked from the list

Parameter Type
title text
subTitle text
image text
index number

LongClick

LongClick_Event

Event raised when a list item is long-clicked

Parameter Type
title text
subTitle text
image text
index number

OnError

OnErrorBlock

Event raised when an error occurs

Parameter Type
errorMessage text

Methods:

ImageListViewer has total 17 methods.

Initialize

InitializeBlock

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

Parameter Type
component component

AddItem

AddItemBlock

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

Parameter Type
title text
subTitle text
image text

RemoveAt

RemoveAtBlock

Remove an item from the List at the given index

Parameter Type
index number

UpdateAt

UpdateAtBlock

Update an item at the given index in the List

Parameter Type
index number
newTitle text
newSubTitle text
newImage text

SmoothScrollTo

SmoothScrollToBlock

Smoothly scroll the ListView to the specified position

Parameter Type
position number

ClearList

ClearListBlock

Clear all items from the List

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

FilterList

FilterListBlock

Filter list items based on the provided search text

Parameter Type
keyword text
caseSensitive boolean

Enable

EnableBlock

Enable the ListView, allowing item and checkbox selection.

Disable

DisableBlock

Disable the ListView, preventing item and checkbox selection.

IsEnabled

IsEnabledBlock

Check if the ListView is enabled.

CheckAll

CheckAllBlock

Check all checkboxes

UncheckAll

UncheckAllBlock

Uncheck all checkboxes

CheckAt

CheckAtBlock

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

Parameter Type
position number

UncheckAt

UncheckAtBlock

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

Parameter Type
position number

IsChecked

IsCheckedBlock

Check if the item at the given index is checked.

Parameter Type
index number

Setter Properties:

ImageListViewer has total 31 designer properties.

CheckboxColor

CheckboxColorBlock

  • Input type: color
  • Default value: &HFF000000

CheckboxVisible

CheckboxVisibleBlock

  • Input type: boolean
  • Default value: False

ImageSize

ImageSizeBlock

  • Input type: integer
  • Default value: 120

TitleFontSize

TitleFontSizeBlock

  • Input type: integer
  • Default value: 16

SubtitleFontSize

SubtitleFontSizeBlock

  • Input type: integer
  • Default value: 14

TitleColor

TitleColorBlock

  • Input type: color
  • Default value: &HFF000000

SubtitleColor

SubtitleColorBlock

  • Input type: color
  • Default value: &HFF808080

TitleBold

TitleBoldBlock

  • Input type: boolean
  • Default value: false

SubtitleBold

SubtitleBoldBlock

  • Input type: boolean
  • Default value: false

TitleHTML

TitleHTMLBlock

  • Input type: boolean
  • Default value: false

TextAlignment

TextAlignmentBlock

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

SubtitleHTML

SubtitleHTMLBlock

  • Input type: boolean
  • Default value: false

DividerColor

DividerColorBlock

  • Input type: color
  • Default value: &HFFFFFFFFF

DividerHeight

DividerHeightBlock

  • Input type: integer
  • Default value: 1

Scrollbar

ScrollbarBlock

  • Input type: boolean
  • Default value: false

ScrollbarColor

ScrollbarColorBlock

  • Input type: color
  • Default value: &HFF808080

FontTypeface

FontTypefaceBlock

  • Input type: asset

ListPaddings

ListPaddingsBlock

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

ImagePaddings

ImagePaddingsBlock

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

TitlePaddings

TitlePaddingsBlock

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

SubtitlePaddings

SubtitlePaddingsBlock

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

ImageSide

ImageSideBlock

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

CornerRadius

CornerRadiusBlock

  • Input type: integer
  • Default value: 0

Elevation

ElevationBlock

  • Input type: integer
  • Default value: 0

BackgroundColor

BackgroundColorBlock

  • Input type: color
  • Default value: &HFFFFFFFF

TouchFeedbackColor

TouchFeedbackColorBlock

  • Input type: color
  • Default value: &HFF808080

TouchFeedback

TouchFeedbackBlock

  • Input type: boolean
  • Default value: true

TitleMaxLines

TitleMaxLinesBlock

  • Input type: integer
  • Default value: 1

SubtitleMaxLines

SubtitleMaxLinesBlock

  • Input type: integer
  • Default value: 3

SubTitleVisible

SubTitleVisibleBlock

  • Input type: boolean
  • Default value: true

ReverseList

ReverseListBlock

  • Input type: boolean
  • Default value: false

Getters:

ImageListViewer has total 7 getter properties.

GetTitles

GetTitlesBlock

Get the items in the ListView.

  • Return type: any

GetSubTitles

GetSubTitlesBlock

Get the items in the ListView.

  • Return type: any

GetImages

GetImagesBlock

Get the image file paths in the ListView.

  • Return type: any

SelectedTitle

SelectedTitleBlock

Get the selected title after picking a list item

  • Return type: text

SelectedSubTitle

SelectedSubTitleBlock

Get the selected subtitle after picking a list item

  • Return type: text

SelectedImage

SelectedImageBlock

Get the selected image after picking a list item

  • Return type: text

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:

14 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