在 Android 中更改滚动条颜色 [英] Change scrollbar color in Android
本文介绍了在 Android 中更改滚动条颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以更改 ScrollView 或 ListView 中滚动条的颜色或外观?
Is it possible to change the color or appearance of the scrollbar in a ScrollView or ListView?
推荐答案
查看 SDK 中的 ApiDemos 示例项目.布局 res/layout/scrollbar2.xml
显示了一种设置滚动条样式的方法.
Check out the ApiDemos sample project in the SDK. The layout res/layout/scrollbar2.xml
shows a way to style scroll bars.
滚动条轨道和滚动条缩略图有单独的属性.大小也可以调整.
There are separate attributes for the scrollbar track and the scrollbar thumb. Size can also be adjusted.
这篇关于在 Android 中更改滚动条颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文