How to change the position of a progress dialog?

前端 未结 4 1176
星月不相逢
星月不相逢 2020-12-15 15:54

I\'m developing an android app and need to know how to change the positioning of a progress dialog. I need it to be positioned at the bottom of the screen instead of at the

4条回答
  •  囚心锁ツ
    2020-12-15 16:40

    You can call ProgressDialog#getWindow#setGravity(...) to change the gravity.

    So:

    ProgressDialog dialog = ProgressDialog.show(AContext, "Test", "On the bottom");
                    dialog.getWindow().setGravity(Gravity.BOTTOM);
    

提交回复
热议问题