Version 1.1 / 2023 - UPDATED
Sometimes the layout size is bigger than your App window this rises the need to attach scrolling/swiping to the layout.
This CustomView solves this problem.
Layout File, the filename of the layout that hosts the views.
Oversize, Value is in 1/10%. Adds extra space at width and height to insure that all views are visible.
Custom Properties:
LayoutFile, set/load the layout file
HScrollview, public Horizontal Scrollview Object (Inner Panel is hosting the layout)
VScrollview, public Vertical Scrollview
The attached Example Project includes the CustomView as readable class for examinating the code.
Installation:
Copy TD_SwipePanel.b4xlib to your additional libraries folder.
Activate Library Scrollview2D ( get it here: https://www.b4x.com/android/forum/threads/lib-scrollview2d.19268/#content)
Usage:
Sometimes the layout size is bigger than your App window this rises the need to attach scrolling/swiping to the layout.
This CustomView solves this problem.
- Show Layouts bigger than App Window by adding vertical and horizontal scrolling.
- Automatic detect needed Layout width and hight by child views of the Layout.
- Published HScrollview and VScrollview Object
- Published Events of the Scrollviews
Layout File, the filename of the layout that hosts the views.
Oversize, Value is in 1/10%. Adds extra space at width and height to insure that all views are visible.
Custom Properties:
LayoutFile, set/load the layout file
HScrollview, public Horizontal Scrollview Object (Inner Panel is hosting the layout)
VScrollview, public Vertical Scrollview
The attached Example Project includes the CustomView as readable class for examinating the code.
Installation:
Copy TD_SwipePanel.b4xlib to your additional libraries folder.
Activate Library Scrollview2D ( get it here: https://www.b4x.com/android/forum/threads/lib-scrollview2d.19268/#content)
Usage:
- Activate TD_swipePanel in the libraries window.
- Drag CustomView in the Designer onto the windowpage and resize it.
- Fill in the Filename in the Designer Custom Property Layout Filename or from code call Custom Property LayoutFile to load the Layout like TD_SwipePanel1.LayoutFile = "ABC.bal".
- Grab TD_SwipePanel Events in the parent page as TD_SwipePanel1_HScrollChanged(Position as Int) / TD_SwipePanel1_VScrollChanged(Position as Int)
Attachments
Last edited: