Android常见控件— — —ProgressDialog

package com.example.uiwidgettest2;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.*; public class ProgressDialogActivity extends Activity{ private ProgressBar progressBar = null;
private Button btn1 = null; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.edittext); progressBar = (ProgressBar)findViewById(R.id.progress_bar);
btn1 = (Button)findViewById(R.id.button1); btn1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ProgressDialog dialog = new ProgressDialog(ProgressDialogActivity.this);
dialog.setTitle("This is ProgressDialog");
dialog.setMessage("Loading...");
dialog.setCancelable(false);
dialog.show();
}
}); } }

Android常见控件— — —ProgressDialog

上一篇:第三百三十九节,Python分布式爬虫打造搜索引擎Scrapy精讲—Scrapy启动文件的配置—xpath表达式


下一篇:通过docker安装nginx和ftp,以及所碰到的一个坑