Reputation: 4024
I am having scrollview inside another scrollview. I want to scroll inner scrollview but outer scrollview is only scrolled.how to solve this problem?
Thanks.
Upvotes: 1
Views: 1185
Reputation: 41
sv01 = (ScrollView) findViewById(R.id.popup_sf_event_scroll_01);
sv02 = (ScrollView) findViewById(R.id.popup_sf_event_scroll_02);
sv02.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_UP)
sv01.requestDisallowInterceptTouchEvent(false);
else
sv01.requestDisallowInterceptTouchEvent(true);
return false;
}
});
Upvotes: 4
Reputation: 2795
in scroll view take one layout and add another scrollview in that layout coz scrollview can hold only one child in it. So that inner scrollview can move for what it is holding in it.
Upvotes: 2