且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我如何展示,然后取出一个机器人进度对话框

更新时间:2023-11-19 08:52:58

这里是我开始工作的code

here is the code that I got to work

private class UpdateFeedTask extends AsyncTask<MyActivity, Void, Void> {

    private ProgressDialog mDialog;

    protected void onPreExecute() {
        Log.d(TAG, " pre execute async");
        mDialog = ProgressDialog.show(MyActivity.this,"Please wait...", "Retrieving data ...", true);

    }

    protected void onProgressUpdate(Void... progress) {
        Log.d(TAG, " progress async");     
    }

    @Override
    protected Void doInBackground(MyActivity... params) {
        // TODO Auto-generated method stub
        return null;
    }

    protected void onPostExecute(Void result) {
        Log.d(TAG, " post execute async");
        mDialog.dismiss();
    }

}