问题描述
重新措辞的问题:当使用自定义的拇指绘制了搜索栏
视图,拇指绘制被剪裁的左右边缘的观点。
Re-worded question: When using a custom thumb drawable with a SeekBar
view, the thumb drawable is clipped at the left and right edges of the view.
喜创建一个自定义的音乐player.But当我播放的歌曲的播放器的头出现在两个sides.I切断没有写任何code修改其默认positon.Have不知道该怎么办。
hi created a custom music player.But when i play the song the player head appears cut off at both sides.I haven't written any code to modify its default positon.Have no idea how to do.
<一个href="http://www.freeimagehosting.net/image.php?eb2dc1e342.jpg">http://www.freeimagehosting.net/image.php?eb2dc1e342.jpg
推荐答案
您应该能够通过设置<$c$c>paddingLeft$c$c>和 paddingRight
在搜索栏
一半的拇指宽度(记得用密度无关的单位)。您也可以通过调用<$c$c>setThumbOffset$c$c>.
You should be able to fix this by setting paddingLeft
and paddingRight
on your SeekBar
to half the thumb width (remember to use density-independent units). You can also control the space allowed at the edges for a seek bar's thumb by calling setThumbOffset
.
这篇关于Android的搜索栏拇指被剪切/切断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!