1, under normal circumstances, the system default dialog display location for the screen center:
Pbdialog = new ProgressDialog (mainactivity.this);p bdialog.setmessage ("Please Wait, load");p bdialog.show ();
2. Set the dialog display position at the bottom of the screen:
Pbdialog = new ProgressDialog (mainactivity.this);p bdialog.setmessage ("Please Wait, load"); Windowmanager.layoutparams params = Pbdialog.getwindow (). GetAttributes ();p Bdialog.getwindow (). Setgravity ( Gravity.bottom);p bdialog.show ();
3, set the dialog display position at the bottom of the screen, and distance from the bottom 100px:
Pbdialog = new ProgressDialog (mainactivity.this);p bdialog.setmessage ("Please Wait, load"); Windowmanager.layoutparams params = Pbdialog.getwindow (). GetAttributes ();p Bdialog.getwindow (). Setgravity ( Gravity.bottom);p arams.y = 100;pbdialog.getwindow (). SetAttributes (params);p bdialog.show ();
android--Define your own ProgressDialog display location (other dialog subclasses can set)