隐藏滚动视图棍机器人视图、机器人

2023-09-04 08:45:32 作者:国民岳父i

我建立一个应用程序中,我需要使用滚动视图。但我并不需要滚动棒出现在屏幕上。我怎样才能做到这一点?请确保滚动功能的作品。

I have built an app in which i need to use scroll-view. But i don't need the scroll stick to appear on screen. How can i do that? Please make sure scroll functionality works.

推荐答案

在java中添加此code

in java add this code

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

在XML中添加下列属性的滚动型

in xml add following attribute to your ScrollView

android:scrollbars="none"

像这样

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/mainScroll"
android:scrollbars="none" <!-- line to be added -->
>