1, under normal circumstances, the System default dialog display position is 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 100px from the bottom:
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 ();