我希望我的搜索栏拇指出现在栏的底部。有没有一种属性(property)方式可以实现这一目标?
<item name="android:progressDrawable">@drawable/custom_seek_bar</item>
<item name="android:thumb">@drawable/seek_bar_thumb</item>
<item name="android:thumbOffset">0dip</item>
<item name="android:minHeight">20dp</item>
<item name="android:maxHeight">20dp</item>
</style>
最佳答案
拇指移位的搜索栏(偏移):
只需在 SeekBar
上设置样式即可调整 minHeight
和 maxHeight
属性:
<item name="android:minHeight">60dp</item>
<item name="android:maxHeight">60dp</item>
来源: 执行与此处显示的修复相反的操作:http://qtcstation.com/2011/05/android-how-to-fix-seekbar-bar-thumb-centering-issues/
替代解决方案:
- 使用 style 中的
thumb
属性修改 thumb drawable,并在 drawable 的顶部添加一些不可见的空间,使 thumb 看起来有点移位 - 使用两个
SeekBar
,一个隐藏,另一个不聚焦...有点像 https://stackoverflow.com/a/13711256/832776但你可能需要修改它们的样式
关于android - 使搜索栏缩略图出现在栏下方,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14191176/