自定义进度视图

发布于 2024-09-15 08:19:05 字数 169 浏览 8 评论 0原文

我正在尝试制作一个看起来像是进度视图自定义的控件。 这就是我应该想做的。 它是一个进度条,可用作倒计时器。从 30 秒开始,条形图呈绿色。随着时间的推移,条形图会缩短。 当时间达到 20 秒时,条形变为黄色。 10 秒时,条形变为红色。

希望您能给我一些如何使用进度视图自定义它的想法?或者是另一个控件的?

I'm trying to make a control that seems a customization of the progress view.
This is what I should want to make.
It is a progress bar that would work as a countdown timer. Start at 30 seconds, and the bar is green. As the time progress the bar is shorten.
When the time is 20 seconds the bar turns to yellow. At 10 seconds, the bar is red.

Hope you can give me some idea how to customize it w/ the progress view? or is it of another control?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

昨迟人 2024-09-22 08:19:05

您必须创建自己的控件。

You will have to create your own control.

筱武穆 2024-09-22 08:19:05

您可能想看看 PDColoredProgressView< /a>.

You might want to have a look at PDColoredProgressView.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文