Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android using Scrollview in a scrollview

Tags:

android

when i tried to use scrollview or webview in a scrollview, the inside scrollview or webview can not scroll. I can scroll with trackball but I can't scroll with touch. Do you have any idea about this issue?

like image 881
onur taskin Avatar asked Mar 11 '26 05:03

onur taskin


1 Answers

I found something and it works for me. I wanted to share. Here it is, I have one scrollview and listview. listview inside scrollview. Scrollview-> RelativeLayout-> Listview. That listener belongs to Listview;

@Override
public boolean onTouch(View v, MotionEvent event) {
    if (event.getAction() == MotionEvent.ACTION_MOVE) {
        ScrollView().requestDisallowInterceptTouchEvent(true);
    }
    return false;
}
like image 141
onur taskin Avatar answered Mar 12 '26 20:03

onur taskin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!