制作自定义瘦进度条/搜索栏
在较高的水平上,我已经完成了几种类型的进度条样式,但是当我尝试使它们变得瘦时,它们都很难看。
我正在寻找一个快速入门教程或布局,它将提供一个类似于下图的栏
任何想法?当/如果我让它们工作时,我会很高兴发布结果。
At a high level, I have done several types of progress bar styles, but they are all ugly when I have attempted to make them skinny.
I am looking for a jump start tutorial or layout that will give a bar that looks similar to below image
Any ideas? I will be glad to publish the results when/if I get them working.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一个属性 android:maxHeight 可以满足您的需求。您应该将 android:thumb 可绘制对象设置为大于 maxHeight 以实现平滑的搜索栏效果。
例如:
slider_progress 可绘制对象取自此处和thumb_img是一个带有红色圆圈的裸PNG。
这是我得到的:
There is a property android:maxHeight which does exactly what you need. You should set the android:thumb drawable bigger than the maxHeight to achieve the slick seekbar effect.
For example:
The slider_progress drawable was taken from here and the thumb_img is a bare PNG with a red circle.
Here is what I got: