public class CustomDialog extends Dialog {
public CustomDialog (Context context) {
WindowManager.LayoutParams para = getWindow().getAttributes();
para.x = 0; //设置起始点
para.y = 0;
para.width = WindowManager.LayoutParams.MATCH_PARENT;
para.windowAnimations = android.R.style.Animation;
para.gravity = Gravity.TOP | Gravity.LEFT;
}
}
原文:http://www.cnblogs.com/hugangyan86/p/4002013.html