Android的搜索栏拇指被剪切/切断 [英] Android SeekBar thumb gets clipped/cut off

查看:224
本文介绍了Android的搜索栏拇指被剪切/切断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重新措辞的问题:当使用自定义的拇指绘制了搜索栏视图,拇指绘制被剪裁的左右边缘的观点。

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

推荐答案

您应该能够通过设置<一个解决这个问题href="http://developer.android.com/reference/android/view/View.html#attr_android:paddingLeft"><$c$c>paddingLeft paddingRight 搜索栏一半的拇指宽度(记得用密度无关的单位)。您也可以通过调用<一个控制允许在边缘的一个搜索栏的拇指空间href="http://developer.android.com/reference/android/widget/AbsSeekBar.html#setThumbOffset(int)"><$c$c>setThumbOffset.

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的搜索栏拇指被剪切/切断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆