Android 进度对话框 ProgressDialog

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        button = (Button) findViewById(R.id.button);
        button.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                // TODO Auto-generated method stub

                // ProgressDialog.show(MainActivity.this, "提示", "正在加载,请稍后...");
                ProgressDialog dialog = new ProgressDialog(MainActivity.this);
                dialog.setTitle("提示");
                dialog.setMessage("正在加载,请稍后...");
                dialog.show();
            }
        });
    }

Android 进度对话框 ProgressDialog_第1张图片

你可能感兴趣的:(Android 进度对话框 ProgressDialog)