문제

How can I remove the scroll bar from a ScrollView programmatically?

setScrollBarStyle() only changes only the style of the scrollbar.

I want to access the xml attribute android:scrollbars programmatically. Is there any way to do that?

android:scrollbars Defines which scrollbars should be displayed on scrolling or not.

도움이 되었습니까?

해결책

The following two method calls will remove the scrollbars in your scrollview:

view.setVerticalScrollBarEnabled(false);
view.setHorizontalScrollBarEnabled(false);

다른 팁

In java add this code:

myScrollView.setVerticalScrollBarEnabled(false);
myScrollView.setHorizontalScrollBarEnabled(false);

In xml add following attribute to your ScrollView:

android:scrollbars="none"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top