iOS Tutorial [B4X] CustomListView with multiple ImageSliders

Erel

Administrator
Staff member
Licensed User
Example of creating a xCustomListView with multiple ImageSliders (https://www.b4x.com/android/forum/threads/87128).



The items values are set to a custom type that holds the ImageSlider and the list of images. Each slider can have a different list of images.

ImageSlider.Tag is set to the item index. The image is returned with:
B4X:
Sub ImageSlider1_GetImage (Index As Int) As ResumableSub
   Dim slider As ImageSlider = Sender
   Dim IndexInList As Int = slider.Tag
   Dim si As SliderAndImages = CustomListView1.GetValue(IndexInList)
   Dim bmp As B4XBitmap = si.Images.Get(Index)
   Return bmp
End Sub
 

Attachments

Top