机器人表演ProgressDialog,直到活动的用户界面加载完成 [英] Android show ProgressDialog until activity UI finished loading
问题描述
您好, 我试着去证明,而该活动加载ProgressDialog。 我的问题是,虽然我完成了所有的工作活动 它需要很长的时间活动加载,我怀疑这是因为我使用 有多个列表视图与viewflipper内自定义数组适配器多个视图。 它需要很长的时间为UI来显示。
Im trying to show a ProgressDialog while the activity is loading. my problem is that although i completed all the work in the activity it takes a long time for the activity to load, i suspect this is because i use multiple views with multiple listviews with custom array adapters inside a viewflipper. it takes a long time for the UI to show.
我将如何去有关检查,所有的活动里面的用户界面加载完成?
how would i go about checking that all the UI inside the activity finished loading?
或者是有办法preLOAD的所有活动和UI?
or is there a way to preload all the activity and the UI?
谢谢
推荐答案
使用的AsyncTask
Use Asynctask
new DownloadTask().execute();
private class DownloadTask extends AsyncTask<String, Void, Object> {
protected void doInBackgroind(Void... arg0){
//Do time Consuming Processing
publishProgres()
return null;
}
protected void onProgressUpdate(Void... arg0){
}
protected void onPostExecute(Void... result){
log.i("AvtivityInfo", "activity finished loading...");
}
}
这篇关于机器人表演ProgressDialog,直到活动的用户界面加载完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!