首页 > 系统 > Android > 正文

[Android新手学习笔记17]-UI控件之ProgressDialog

2019-11-09 16:06:42
字体:
来源:转载
供稿:网友
public class MainActivity extends AppCompatActivity {    @Override    PRotected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setContentView(R.layout.activity_main);        Button button = (Button) findViewById(R.id.button);        button.setOnClickListener(new View.OnClickListener() {            @Override            public void onClick(View v) {                ProgressDialog progressDialog = new ProgressDialog(MainActivity.this);                progressDialog.setTitle("进程对话框");                progressDialog.setMessage("加载中...");                progressDialog.setCancelable(true);                progressDialog.show();            }        });    }}
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表