简体   繁体   English

搜索栏的圆角

[英]Rounded corners of seekbar

I have a Seekbar in my XML file.我的 XML 文件中有一个 Seekbar。 The problem is, that I want to customize the Seekbar like a rounded thumb, a rounded background etc. Custom Seekbar问题是,我想自定义搜索栏,如圆形拇指、圆形背景等。自定义搜索栏

What I have tried:: I have implemented a Custom Seekbar but not working I have added repositories from Github:: https://github.com/akexorcist/Android-RoundCornerProgressBar/issues我尝试过的:我已经实现了自定义搜索栏但没有工作我从 Github 添加了存储库: https : //github.com/akexorcist/Android-RoundCornerProgressBar/issues

I have implemented custom Seekbar background and thumb but the thumb is not rounded.我已经实现了自定义的 Seekbar 背景和拇指,但拇指不是圆形的。

So I can I implement this Custom Seekbar ??所以我可以实现这个自定义搜索栏??

Edit::编辑::

So I have successfully implemented rounded corners in my Seekbar.所以我已经成功地在我的 Seekbar 中实现了圆角。 The problem is, that the Thumb is getting clipped off like this: https://youtu.be/M0LpMYB1TSY问题是,Thumb 像这样被剪掉了: https : //youtu.be/M0LpMYB1TSY

Just set thumbOffset:8dp in your SeekBar.只需在 SeekBar 中设置 thumbOffset:8dp。 Hope it works希望它有效

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM