本文实例讲述了android自由改变Dialog窗口位置的方法。分享给大家供大家参考。具体如下: Dialog dialog = new Dialog(this); dialog.setContentView(R.layout.dialog_layout); dialog.setTitle(Custom Dialog); //获得当前窗体 Window window = dialog.getWindow(); //重新设置 WindowManager.LayoutParams lp = dialogWindow.getAttributes(); window .setGravity(Gr