Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Web 服务,它查询云中的一些数据,然后填充一个 ListView。
我想向用户显示某种旋转指示器,让他们知道正在查询云。
我不希望显示带有微调器的弹出窗口,因为我希望我的用户仍然能够使用该应用程序。我将它用于我的登录屏幕,但在这里不适用。
有没有内置的方法可以做到这一点?我当然可以通过包含我自己的旋转图像资源并在查询云时隐藏/显示资源来自己破解它,但我希望有一些内置资源,所以我不必使用我自己的。
选项 1:您可以在标题栏的右上角设置微妙的微调器。Activity.setProgressBarIndeterminateVisibility().
Activity.setProgressBarIndeterminateVisibility()
选项 2:您可以ProgressBar在布局中添加一个。一定要让它不确定,让它看起来像一个微调器,而不是一个酒吧。您可以通过更改其可见性来打开和关闭它。
ProgressBar