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();
}
});
}
}