iOS Tutorial [B4X] CustomListView with multiple ImageSliders

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

SS-2018-09-14_10.26.53.png


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

  • SlidersList.zip
    27 KB · Views: 1,125
Top