如何设置固定大小的ListView的经验? [英] How to set fixed size for thumb of ListView?
本文介绍了如何设置固定大小的ListView的经验?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是自定义的拇指的ListView:
I'm using custom thumb for ListView:
使用样式
<style name="CustomTheme" parent="@android:style/Theme.NoTitleBar">
<item name="android:scrollbarThumbVertical">@drawable/scroll_thumb</item>
</style>
但在应用它的样子:
but in application it looks like:
我如何设置拇指大小?
修改
我不想用九片图像。我需要设置固定的大小,以我的拇指。
I don't want to use nine-patch image. I'm need to set fixed size to my thumb.
推荐答案
您滚动条的拇指必须是一个9patch PNG。既然你不想让它伸展,您不需要在边缘添加任何的黑线,只是弹出它的绘图9补丁编辑器并将其保存为.9.png
Your ScrollBar thumb needs to be a 9patch png. Since you don't want it to stretch, you don't need to add any black lines on the edge, just pop it in the Draw 9-patch editor and save it as a .9.png
这篇关于如何设置固定大小的ListView的经验?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文