I\'m trying to put a ScrollView inside another ScrollView and I tried the answers found on this site but it still doesn\'t seems to work completely. Here is the XML:
use this custom scrollview as inner scrollview:
public class TouchMeScrollView extends ScrollView {
public TouchMeScrollView(Context context) {
super(context);
}
public TouchMeScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public TouchMeScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public TouchMeScrollView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
requestDisallowInterceptTouchEvent(true);
return super.onTouchEvent(ev);
}
}