用户无法更改进度条

发布于 2024-08-10 23:44:10 字数 105 浏览 0 评论 0原文

如何使 Android 中的 ProgressBar 不能被用户更改。 我的意思不是“禁用”,因为我的应用程序会动态更新它。 我希望进度条由我的应用程序更新,但用户无法移动进度条中的条来更改值?

How can I make a ProgressBar in Android not changeable by user.
I don't mean 'disabled', since my application will update it dynamically.
I would like the ProgressBar to update by my application but user can't move the bar in the Progress bar to change value?

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

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

发布评论

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

评论(1

独自唱情﹋歌 2024-08-17 23:44:10

检查布局 xml 和代码,确保您使用的是 ProgressBar 小部件,而不是 SeekBar 小部件。

SeekBar 看起来像进度栏,但用户可以修改。

看看 这个 ProgressBar来自 ApiDemos 的示例供参考。

Check your layout xml and code to make sure that you are using the ProgressBar widget and NOT the SeekBar widget.

SeekBar looks like the Progress bar but is user modifiable.

Have a look at this ProgressBar example from the ApiDemos for reference.

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