Android Question scrollview problem

Discussion in 'Android Questions' started by eades, Feb 15, 2015.

  1. eades

    eades Member Licensed User

    i have several ultimatelistviews in a scrollview but i can't use de scroll function in the selected ultimatelistview because when i try to scroll the scrollview scrolls.
    setting the enabled function from the scrollview to false in the celltouch event wo'nt work.
    On the internet i have found some java code to do this but how do i implement this in b4a
    Can someone help me with this?
    the java code is:
    ListView lv =(ListView) findViewById(;
    lv.setOnTouchListener(newOnTouchListener(){// Setting on Touch Listener for handling the touch inside ScrollView@Overridepublicboolean onTouch(View v,MotionEventevent){// Disallow the touch request for parent scroll on touch of child view
    My ultimate listview is called ULV_1
    Thanks in advance.
    PS sorry for my bad english, i am Dutch.

    ok i have found the solution
    Sub ULV_1_CellTouch (CellIndex As Byte, Position As Int, Action As Int, X As Int, Y As Int, TouchedPanel As Panel)
    Dim r As Reflector
    r.Target = Materiaal_scroll ' the scrollview
    r.RunMethod2("requestDisallowInterceptTouchEvent", True, "java.lang.boolean")
    End Sub
    Now the scroll function in the ultimate listview works perfect and the scrollview works to.
    Last edited: Feb 16, 2015
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice