我正在使用 ScrollView,我想设置 ScrollBar 大小,但我尝试的一切都失败了。
我尝试使用属性 android:scrollbarSize、样式、主题,但什么也没有。滚动条的大小始终相同。
有什么建议么?谢谢
我尝试过这个:
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="10px"
android:layout_marginBottom="15px"
android:scrollbarSize="20px"
android:scrollbarTrackVertical="@drawable/scrollbar_reflection"
android:scrollbarThumbVertical="@drawable/scrollbar_state2">
但滚动条的宽度不会改变。
所以我创建了一个这样的样式文件:
<resources>
<style name="ShowAllScrollBar1">
<item name="android:scrollbarSize">20px</item>
</style>
</resources>
然后在AndroidManifest.xml中设置样式
尝试实施android:scrollbarThumbVertical
and android:scrollbarSize="1dp"
一起,您的问题将得到解决滚动视图, 回收视图.
参考下面的代码片段
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="10px"
android:layout_marginBottom="15px"
android:scrollbars="vertical"
android:scrollbarThumbVertical="@color/colorPrimaryDark"
android:scrollbarSize="1dp">
For 水平滚动视图:
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="10px"
android:layout_marginBottom="15px"
android:scrollbars="horizontal"
android:scrollbarThumbHorizontal="@color/colorPrimaryDark"
android:scrollbarSize="1dp">
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)