B4J Library [B4X] [XUI] SD XUIScrollView2D

I develop the cross-platform version of the ScrollView2D library.
XUIScrollView was developed all from scratch.
xScrollView is a wrapping of the native ScrollView but which standardizes the commands so that they can be used cross-platform.
Everyone can choose which one is best suited to their purpose

NOTE: You can use this library for personal and commercial use. Include it in your projects.. Attention, even if it is a B4XLib library, it is not allowed to decompress it, modify it, change its name or redistribute it without the permission of the author

SD_XUIScrollView2D

Author:
Star-Dust
Version: 0.14
  • XUIScrollView
    • Events:
      • ScrollChanged (X As Float, Y As Float)
    • Fields:
      • Tag As Object
      • ScrollingX As Boolean
      • ScrollingY As Boolean
    • Functions:
      • AddView (View As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)
      • BringToFront
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
        Base type must be Object
      • FullScroll (Bottom As Boolean)
      • GetAllViewsRecursive As List
      • GetBase As B4XView
      • GetView (Index As Int) As B4XView
      • Initialize (Callback As Object, EventName As String)
      • Initialize2 (Callback As Object, EventName As String, PanelParent As B4XView, Width As Int, Height As Int)
      • Invalidate
      • LoadLayout (LayoutFile As String)
      • NumberOfViews As Int
      • Parent As B4XView
      • RemoveAllViews
      • RemoveViewFromParent
      • RequestFocus
      • ScrollPositionX (X As Float)
      • ScrollPositionY (Y As Float)
      • SendToBack
      • SetBitmap (bmp As B4XBitmap)
      • SetColorAndBorder (Backgroundcolor As Int, BorderWidth As Int, BorderColor As Int, BorderCornerRadius As Int)
      • SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int)
      • SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int)
      • SetPanelBitmap (bmp As B4XBitmap)
      • SetRotationAnimated (Duration As Int, Degree As Int)
      • SetVisibleAnimated (Duration As Int, Visible As Boolean)
      • Snapshot As B4XView
    • Properties:
      • Color As Int
      • Enable As Boolean
      • FastScroll As Boolean
      • Height As Int
      • HorizontalBar As Boolean
      • Left As Int
      • Panel As B4XView [read only]
      • PanelHeight As Int
      • PanelWidth As Int
      • PositionX As Float
      • PositionY As Float
      • Top As Int
      • VerticalBar As Boolean
      • Visible As Boolean
      • Width As Int
  • xScrollView
    • Events:
      • ScrollChanged (X As Double, Y As Double)
      • ScrollChangedX (X As Double)
      • ScrollChangedY (Y As Double)
    • Fields:
      • Tag As Object
    • Functions:
      • AddToParent (MainPane As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)
        Create from codice
      • AddView (View As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)
      • BringToFront
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
        Base type must be Object
      • FullScroll (Bottom As Boolean)
      • GetAllViewsRecursive As List
      • GetBase As B4XView
      • GetView (Index As Int) As B4XView
      • Initialize (Callback As Object, EventName As String)
      • IsInitialized As Boolean
      • LoadLayout (LayoutFile As String)
      • NativeObject As Object
      • NumberOfViews As Int
      • Parent As B4XView
      • RemoveAllViews
      • RemoveViewFromParent
      • RequestFocus
      • SendToBack
      • SetBitmap (bmp As B4XBitmap)
      • SetColorAndBorder (Backgroundcolor As Int, BorderWidth As Int, BorderColor As Int, BorderCornerRadius As Int)
      • SetColorAnimated (Duration As Int, FromColor As Int, ToColor As Int)
      • SetLayoutAnimated (Duration As Int, Left As Int, Top As Int, Width As Int, Height As Int)
      • SetPanelBitmap (bmp As B4XBitmap)
      • SetRotationAnimated (Duration As Int, Degree As Int)
      • SetVisibleAnimated (Duration As Int, Visible As Boolean)
      • Snapshot As B4XView
    • Properties:
      • Color As Int
      • Enable As Boolean
      • Height As Int
      • HorizontalBar As Boolean
      • Left As Int
      • Panel As B4XView [read only]
      • PanelHeight As Int
      • PanelWidth As Int
      • PositionX As Double
      • PositionY As Double
      • Top As Int
      • VerticalBar As Boolean
      • Visible As Boolean
      • Width As Int


video1-gif.81039


__________________________________________________
Log version
0.02

Rounded scroll bars
0.03
Fix bugs of bars
Add B4J Version
0.04
B4XLib now
BUGS flicker correction
0.06
BUGS flicker correction
0.07
Add RemoveAllViews method
0.08
Fix bugs. Add Panel member
0.09
Fix bugs.
0.11
Touch interception improved.
0.12
New class added. XScrollView. It uses the native scrollView classes (ScrollView2D for b4a) by standardizing the use
fix bugs (B4a)
Updated examples (B4XPages)
0.13
fix bugs
0.14
Added ScrollingY and ScrollingY to enable or disable scrolling
 

Attachments

  • Sample_xScrollView.zip
    15.1 KB · Views: 469
  • Sample_XuiScrollView2D.zip
    19.8 KB · Views: 454
  • SD_XUIScrollView2D.b4xlib
    6.3 KB · Views: 181
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
See the example I attached to you. It is based on @Erel's suggestion
 

Attachments

  • TestScroll.zip
    10.4 KB · Views: 390

TelKel81

Active Member
Licensed User
I reread the whole thread.

I really don't want to be annoying but :

With Scrollview2D, it works even when I implement a click event.

Your library is called XUIScrollView2D and the thread starts with "I develop the XUI version of the ScrollView2D library that created @Informatix."

God save me, I expected similar fundamental behavior.

Reread the whole ScrollView2D library, it will explain this topic.
 

Star-Dust

Expert
Licensed User
Longtime User
I reread the whole thread.

I really don't want to be annoying but :

With Scrollview2D, it works even when I implement a click event.

Your library is called XUIScrollView2D and the thread starts with "I develop the XUI version of the ScrollView2D library that created @Informatix."

God save me, I expected similar fundamental behavior.

Reread the whole ScrollView2D library, it will explain this topic.
They are two different libraries with different implementation. Don't be upset if I wrote you to reread, it wasn't meant to be an offense, but I got the impression you didn't notice Erel's suggestion.

I posted you an example, see if it can be useful.
 

TelKel81

Active Member
Licensed User
Ok I'm not upset anymore.

I'll use ScrollView2D, XUIScrollView2D is not quite "out of the box" cross-platform (for my project) if I have to implement B4A libraries along with it.

Thanks for the help and quick follow-ups. Keep up the good work, I have seen a lot of your other libraries (views) and I appreciate this content a lot.
 

Star-Dust

Expert
Licensed User
Longtime User
Ok I'm not upset anymore.

I'll use ScrollView2D, XUIScrollView2D is not quite "out of the box" cross-platform (for my project) if I have to implement B4A libraries along with it.

Thanks for the help and quick follow-ups. Keep up the good work, I have seen a lot of your other libraries (views) and I appreciate this content a lot.
My library is not what a wrapper of native scrollview libraries might look like. You already get that by using xCustomListView which uses native views.

I wanted to create something from scratch and entirely with b4xView views. Behaviors are different. Scrolling is also not as smooth as native scrolling. I build the view from scratch.

It is not necessarily more performing than the others but has the goal of having 2D and uniform methods for the three platforms.

I'm sorry I wasn't helpful
 

Star-Dust

Expert
Licensed User
Longtime User
Update 0.11
 

Star-Dust

Expert
Licensed User
Longtime User
Update 0.12
  • New class added. xScrollView. It uses the native scrollView classes (ScrollView2D for b4a) by standardizing the use
  • fix bugs (b4a)
  • Updated examples (B4XPages)
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Release 0.14
Added ScrollingY and ScrollingY to enable or disable scrolling to XUIScrollView
 
Top