I am creating a scrollview dynamically and I had a very basic question. Is the ScrollView() by default have vertical scrolling? Do I have to set it using this: setVerticalScrollBarEnabled(true); ? If not what would I use to create the vertical scroll?
My code I am using this in:
ScrollView sV = new ScrollView(getActivity());
sV.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
sV.setVerticalScrollBarEnabled(true);
By default,
ScrollViewadds vertical scrolling. In order to add horizontal scrolling, use HorizontalScrollView. So, you don’t have tosV.setVerticalScrollBarEnable(true), scrollbar will be added when content is larger than device screen.