由网友(别回忆,因为回不去)分享简介:什么是展示装载微调,而应用程序正在等待服务器响应的最好方法是什么?可以这样做编程?所以,我没有加负载微调的xml文件?解决方案 ProgressDialog进度=新ProgressDialog(本);progress.setTitle(加载);progress.setMessage(稍等...);progr...![百度云总是显示在加载,但是就是加载不出来,文件无法下载](/d/file/2023/09-17/46b342b9b81a3ab5c8925d0ecb50eda9.png)
什么是展示装载微调,而应用程序正在等待服务器响应的最好方法是什么?
可以这样做编程?所以,我没有加负载微调的xml文件?
解决方案 ProgressDialog进度=新ProgressDialog(本);
progress.setTitle(加载);
progress.setMessage(稍等...);
progress.show();
//要关闭该对话框
progress.dismiss();
或
ProgressDialog.show(这一点,加载,稍等...);
点击此处了解更多。
顺便说一句,微调有不同的含义在Android中。 (这就像在HTML选择下拉)
![百度云总是显示在加载,但是就是加载不出来,文件无法下载](/d/file/2023/09-17/46b342b9b81a3ab5c8925d0ecb50eda9.png)
What is the best way to show a loading spinner while the app is waiting for a response from the server?
Can this be done programmatically? So that I don't have to add the load spinner in the xml file?
解决方案ProgressDialog progress = new ProgressDialog(this);
progress.setTitle("Loading");
progress.setMessage("Wait while loading...");
progress.show();
// To dismiss the dialog
progress.dismiss();
OR
ProgressDialog.show(this, "Loading", "Wait while loading...");
Read more here.
By the way, Spinner has a different meaning in Android. (It's like the select dropdown in HTML)
相关推荐
最新文章