Scrollview inside scrollview in android
I am having scrollview inside another scrollview. I want to scroll inner scrollview but oute开发者_Python百科r scrollview is only scrolled.how to solve this problem?
Thanks.
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;
}
});
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.
精彩评论