Android,水平进度条从中心到侧面填充(Android, horizontal progressBar filled from center to sides)

编程入门 行业动态 更新时间:2024-10-28 16:28:03
Android,水平进度条从中心到侧面填充(Android, horizontal progressBar filled from center to sides)

我需要绘制一个水平的progressBar,但不是从左到右或从右到左填充,我需要从中心到侧面填充ir。

我已经阅读了我发现的所有内容,并找到了允许我这样做的任何图书馆,但我还没有找到任何东西。 我可以画直角,但我需要做一些计算以保持尺寸等等......

有人可以帮帮我吗?

非常感谢,事先。

I need to draw a horizontal progressBar, but instead of fill from left to right or from Right to left, I need that ir can be filled from center to sides.

I've read all I've found and find out any library that allow me to do this, But I haven't found anything. I can do it drawing rectagles, but I'll need to do some calculations to keep dimensions and so on...

Anyone can help me?

Thanks a lot beforehand.

最满意答案

通过组合2个进度条,您可以轻松地自己完成此操作。

左边是1,左边是右边,右边是1,左边是右边。 然后在它们两个上设置相同的进度,它们之间没有任何空间。 这将产生一个从中间和外部增长的进度条的错觉。

如果你真的想要一个库,这个库可以为你做到: https://github.com/castorflex/SmoothProgressBar

You could quite easily do this by yourself, by combining 2 progressbars.

1 to the left, that goes right-to-left, and 1 to the right, that goes left-to-right. Then just set the same progress on both of them, without any space in between them. This would create the illusion of 1 progress bar that grows from the middle and outward.

If you really do want a library, this library could do it for you: https://github.com/castorflex/SmoothProgressBar

更多推荐

本文发布于:2023-07-22 06:34:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1217737.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:侧面   进度条   水平   中心   Android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!