1、普通情况下,系统默认的Dialog显示位置为屏幕居中:

	pbDialog = new ProgressDialog(MainActivity.this);
pbDialog.setMessage("请稍等,载入中");
pbDialog.show();

2、设置Dialog显示位置在屏幕底部:

	pbDialog = new ProgressDialog(MainActivity.this);
pbDialog.setMessage("请稍等,载入中"); WindowManager.LayoutParams params = pbDialog.getWindow().getAttributes();
pbDialog.getWindow().setGravity(Gravity.BOTTOM);
pbDialog.show();

3、设置Dialog显示位置在屏幕底部,而且距离底部100px:

	pbDialog = new ProgressDialog(MainActivity.this);
pbDialog.setMessage("请稍等,载入中"); WindowManager.LayoutParams params = pbDialog.getWindow().getAttributes();
pbDialog.getWindow().setGravity(Gravity.BOTTOM);
params.y = 100;
pbDialog.getWindow().setAttributes(params);
pbDialog.show();
05-11 13:21