问问题
47 次
1 回答
2
You can define gravity for an alert dialog by using following piece of code.
WindowManager.LayoutParams wmlp = resolutionDialog.getWindow().getAttributes();
wmlp.gravity = Gravity.TOP | Gravity.LEFT;
wmlp.x = 0; // specify x axis position
wmlp.y = 0; // specify y axis position
yourDialog.show();
于 2016-04-11T13:48:53.307 回答