用户无法更改进度条
如何使 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查布局 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.