我正在使用 ScrollView ,希望能够设置滚动条的大小,但是我尝试了多种方法都没有成功。我尝试过使用属性 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 中设置样式。