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.
我想在操作栏上放一个进度条,但我有一个导航抽屉,我该怎么做?
看起来像图像:
谢谢..
不确定是否对导航抽屉有影响,但要在操作栏中添加进度对话框,您可以这样做:在您的 中onCreate(),在调用之前添加setContentView(): requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
onCreate()
setContentView()
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
然后在您希望进度条显示之前,添加: setProgressBarIndeterminateVisibility(true);
setProgressBarIndeterminateVisibility(true);
然后将其设置为 false 以隐藏它。
我希望这会帮助你!