Android的滚动型机器人集:滚动条="无",滚动视图无法正常工作 [英] android scrollview set android:scrollbars="none",the scrollview doesn't work

查看:151
本文介绍了Android的滚动型机器人集:滚动条="无",滚动视图无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<ScrollView
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:scrollbars="none" >
</ScrollView>

我设置的android:滚动条=无,滚动视图无法正常工作

I set android:scrollbars="none",the scrollview doesn't work

推荐答案

您可以用findViewById获得滚动型的实例和编程禁用滚动条,请参阅本<一个href=\"http://r00tsecurity.org/forums/topic/12052-android-hide-scrollbar-in-scrollview/\"><$c$c>Blog

You can get the instance of ScrollView using findViewById and disable the scrollbars programatically, refer this Blog

  ScrollView sView = (ScrollView)findViewById(R.id.ScrollView01);
  sView.setVerticalScrollBarEnabled(false);
  sView.setHorizontalScrollBarEnabled(false);

这篇关于Android的滚动型机器人集:滚动条=&QUOT;无&QUOT;,滚动视图无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆