Android HorizontalScrollView disable scrolling
android
Solution
My suggestion is to use an OnTouchListener, for example:
In `onCreate` Method
HorziontalScrollView scrollView= (HorizontalScrollView)findViewById(R.id.scrollView);
scrollView.setOnTouchListener(new OnTouch());
And has a class:
private class OnTouch implements OnTouchListener
{
@Override
public boolean onTouch(View v, MotionEvent event) {
return true;
}
}
Problem
I have HorizontalScrollView with long view as a child, so HorizontalScrollView is scrollable and can scroll its child horizontally. Is there any possibility to block that? I don't want user to be able to scroll the view.