Android Question Button over Scrollview, dont work until moved stop

scsjc

Well-Known Member
Licensed User
Longtime User
Hello,
I have a scrollview on a class. In activity module, call this class and add a button over class.

When i move the scrollview i push the button and does nothing. When the scrollview are finish moved the button work.

I dont know to fix this problem... DOEVENTS ???
 

scsjc

Well-Known Member
Licensed User
Longtime User
DoEvents should not be used and will most probably won't help with this.

The ScrollView consumes the touch gesture while it is being scrolled to avoid unwanted events.


I understand, and can not get a touch in any way?
My problem is that when people move the scrollview in the chat window, and click button down, it does not work until the stop scroll

Thanks
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
Move the button out of the ScrollView.

Really nice idea, but is not good into design....aixxxxx :(
You think im create a panel with button inside, and elevation panel working ???

screen.png
 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
Yes. There is no reason for the arrow button to be in the scrollview.

Im try, but that is no problem, the button or panel always take a event when push.
The problem are when sv are moving... can't jump to end.... i show part of code from class where are this function:

B4X:
Public Sub jumptoend
    DoEvents
    sv.ScrollToNow(5000000)
    DoEvents
    sv.SendToBack
End Sub

Sub SV_ScrollChanged(Position As Int)
    Dim espaciopix As Int = 150dip
    If sv.Height + Position + espaciopix >= sv.Panel.Height Then
      'Log("bottom")
        finalchat=True
        CallSubDelayed2(CallBack,"showicondown",False)
    Else
        finalchat=False
        CallSubDelayed2(CallBack,"showicondown",True)
    End If
End Sub
 
Upvote 0
Top