WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
Display display = windowManager.getDefaultDisplay();
android.view.WindowManager.LayoutParams p = getWindow().getAttributes();
p.height = (int) (display.getHeight() * 0.75);
p.width = display.getWidth();
p.gravity = Gravity.BOTTOM;
getWindow().setAttributes(p);