ImageSlider custom view is compatible with B4A, B4i and B4J.
Features:
Usage:
1. Add ImageSlider with the designer.
2. Set the number of images:
3. Implement the GetImage event. This is a resumable sub.
You should return a B4XBitmap based on the index.
In this example the images are loaded from the assets folder.
4. Call ImageSlider.NextImage or PrevImage.
A B4J project with the ImageSlider class: www.b4x.com/b4j/files/ImageSlider.zip
A B4A example where the http requests are made from the starter service is available here: https://www.b4x.com/android/forum/t...sing-when-the-slider-is-on.95779/#post-604705
Updates
V1.11 - Fixes the dot indicator offset.
V1.10 - adds a dot indicator and fixes a bug: https://www.b4x.com/android/forum/threads/b4x-xui-imageslider.87128/page-2#post-618398
The latest version is included in the B4J project.
Features:
- Three transition types: horizontal, vertical and fade. Configured in the visual designer.
- Images are centered and not distorted.
- Next and previous images are cached.
- Sliding gestures.
- Flexible data source.
- Cross platform.
Usage:
1. Add ImageSlider with the designer.
2. Set the number of images:
B4X:
ImageSlider1.NumberOfImages = 4
You should return a B4XBitmap based on the index.
B4X:
Sub ImageSlider1_GetImage (Index As Int) As ResumableSub
Return xui.LoadBitmapResize(File.DirAssets, $"test_${Index + 1}.jpg"$, _
ImageSlider1.WindowBase.Width, ImageSlider1.WindowBase.Height, True)
End Sub
4. Call ImageSlider.NextImage or PrevImage.
A B4J project with the ImageSlider class: www.b4x.com/b4j/files/ImageSlider.zip
A B4A example where the http requests are made from the starter service is available here: https://www.b4x.com/android/forum/t...sing-when-the-slider-is-on.95779/#post-604705
Updates
V1.11 - Fixes the dot indicator offset.
V1.10 - adds a dot indicator and fixes a bug: https://www.b4x.com/android/forum/threads/b4x-xui-imageslider.87128/page-2#post-618398
The latest version is included in the B4J project.
Last edited: