Android Question [B4X] [XUI] SD XUIScrollView2D is flickering

klaus

Expert
Licensed User
I just tested the XUIScrollview2D library.
I noticed that the movement of the table is flickering when scrolling insides the table, with the finger in B4A or the mouse cursor in B4J.
 

klaus

Expert
Licensed User
It is still flickering in B4A especially when you move the finger slowly.
In B4J it doesn't flicker anymore but the displacement of the panel is smaller than the displacement of the mouse cursor, this happens also in B4A.
 

Star-Dust

Expert
Licensed User
In B4J it doesn't flicker anymore but the displacement of the panel is smaller than the displacement of the mouse cursor, this happens also in B4A.
Could you observe if the movements were of the right speed in the previous version?
 

Star-Dust

Expert
Licensed User
The thing is more complicated here than you thought because of the use of the XUI library. And anyway it's not clear why he sends coordinates even if you don't move your finger.

I'll tell you in the coming days
 

klaus

Expert
Licensed User
The flickering of the scrolling in your project comes from the fact that you use the Touch event of the internal panel PanelLocal_Touch and not the parent panel mBasePanel_Touch.
The PanelLocal.Left and PanelLocal.Top properties are changed during scrolling producing the flickering.

I have begun to write my own, see here.
 

klaus

Expert
Licensed User
Thank you.
I had seen it yesterday evening and put it on my to do list for today.
The flickering is no more present !

There is a problem with scrolling with the finger.
When we add views with events like a table with labels onto the scrollview, this one doesn't scroll anymore with the finger.
The only possibility is with the scrollbars.

A suggestion for the scrollbars.
Make the bar scrolling only when the user touches the cursor.
And when the user clicks on the scrollbar outsides the cursor scroll 1 page, like in windows.
 

Star-Dust

Expert
Licensed User
There is a problem with scrolling with the finger.
When we add views with events like a table with labels onto the scrollview, this one doesn't scroll anymore with the finger.
The only possibility is with the scrollbars.
This is because the views above the panel absorb the touch event.
I excluded the possibility of addi a transparent panel over the views would allow a constant scrolling but would cancel the events of the other views.

A suggestion for the scrollbars.
Make the bar scrolling only when the user touches the cursor.
And when the user clicks on the scrollbar outsides the cursor scroll 1 page, like in windows.
In the first version it was actually like that, then for a reason I don't remember I modified it.
I will try to do it again.

Thank you for your suggestion
 

klaus

Expert
Licensed User
This is because the views above the panel absorb the touch event.
I know, but for me this is a problem because phone and tablet users would want it.
I have not yet looked if there is a possibility to send the event to the underlying view in Android.
In B4J it works in my scrollview.
And, if I remember well, in B4i it's also the case.
 
Last edited:

Star-Dust

Expert
Licensed User
I know, but for me this is a problem because phone and tablet users would want it.
I have not yet looked if there is a possibility to send the event to the underlying view in Android.
In B4J it works in myscrollview.
And, if I remember well, in B4i it's also the case.
If you think it is useful I can create the possibility to enable a panel above for scrolling but which cancels the events of the underlying objects.
I can always make an option to enable or disable it.
 

Erel

Administrator
Staff member
Licensed User
Check B4XDrawer code for the best approach to handle such cases. It is more complicated but the result is that the user can both interact with the visible controls and can scroll the underlying control.
It is relevant for B4A and B4i.
 
Top