DialogFragment . получилось сделать так
private final float dimAmount = 0.74f; немного непрозначности для всего что будет за диалогом
@Override public void onStart() {
super.onStart();
Dialog dialog = getDialog();
if (dialog != null) {
try {
dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
Window window = dialog.getWindow();
WindowManager.LayoutParams params = window.getAttributes();
params.dimAmount = dimAmount;
window.setAttributes(params);
window.setGravity(Gravity.CENTER_HORIZONTAL |
Gravity.TOP);
window.setBackgroundDrawableResource(android.R.color.transparent);
} catch (Exception e) {
e.printStackTrace();
}
}
}