王立平--ProgressDialog

来源:互联网 发布:江浦教育行知实践基地 编辑:程序博客网 时间:2024/05/21 22:22

效果图:


public class Login extends Activity {
private Button btn_login; 
private ProgressDialog pd;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
btn_login=(Button) findViewById(R.id.btn_login); 

btn_login.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
// Toast.makeText(Login.this, edt_username.getText().toString(), Toast.LENGTH_SHORT).show();  
pd = new ProgressDialog(Login.this);
pd.setMessage("正在查询,请稍后...");
pd.setIndeterminate(true);
pd.setProgressStyle(ProgressDialog.STYLE_SPINNER);
pd.show();
 
 

}
});

0 0
原创粉丝点击