This Instagram style image slider is compatible with B4A and B4I.
- B4A: JavaObject, XUI, GestureDetector, AHViewPager(ver. 3), OkHttpUtils2
- B4I: iXUI, iHttpUtils2
- Instagram like Image Counter
- Instagram like Dot Indicator
- Instagram like Pinch Zoom (optional)
- Cover blank space with blurry image/color
- Customizable Indicator color and animation duration
- Single Tap and Double Tap
- Fit / Fill Image
- Lazy loading (NEW)
- Loading indicator (NEW)
- Support both local and remote image (NEW)
- Retry loading option for failed remote image (NEW)
- Update image list on runtime (NEW)
- SetImages(imgs As List)
Set/Update images to the image slider along with the value you want to receive on tap events
- SetZoomPanel(ZoomPanelContainer As B4XView)
Set zoom panel (Usually Activity / Root panel) to enable the pinch zoom feature
Show next image
Show previous image
- activityHasActionBar As Boolean
Set it to false if there is no Action bar (b4a) / Navigation bar (B4I). Default is True. Only needed if the pinch zoom is enabled.
- CurrentIndex As Int
- Dots Color: Change the inactive dot indicator color.
- Active Dot Color: Change the active dot color.
- Fit Image: Fit image to the slider maintaining aspect ratio
- Cover Free Space: Show a blurry image around the slide image if there is any free space. Only applicable if Fit Image is checked.
- Free Space Color: Show a solid color around the slide image if there is any free space. Only applicable if Cover Free Space is unchecked.
- Slide Count: Show slide count label (Eg. 5/10)
- Dot Transition Duration: Dots transition time in milliseconds
- Zoom Actual View: If checked the slide will be hidden while zooming (Like Instagram).
- SingleTap(CurrentIndex As Int, Data As Object)
- DoubleTap(CurrentIndex As Int, Data As Object)
- Add this view from the Designer.
- Create a
B4XOrderedMapList having images as bitmap or url as string and data as object (See Example).
- Set that
maplist to the image slider
- Set zoom panel (optional)
- Added support for lazy loading
- Added support for remote image loading (Example attached)
- New loading indicator and tap to retry option for failed remote image
- Fixed crash issue in Android 28.
- Added support for updating the image list (Check updated example).
5.7 KB Views: 4
161.5 KB Views: 4
168.2 KB Views: 2