В общем-то вопрос в заголовке.
Как растянуть диалог по высоте во весь экран?
Как растянуть диалог по высоте на весь экран?
Re: Как растянуть диалог по высоте на весь экран?
Оптимальный вариант нашел тут: http://stackoverflow.com/questions/2306 ... creen-size
Код: Выделить всё
Activity activity = ...;
AlertDialog dialog = ...;
// retrieve display dimensions
Rect displayRectangle = new Rect();
Window window = activity.getWindow();
window.getDecorView().getWindowVisibleDisplayFrame(displayRectangle);
// inflate and adjust layout
LayoutInflater inflater = (LayoutInflater)activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.your_dialog_layout, null);
layout.setMinimumWidth((int)(displayRectangle.width() * 0.9f));
layout.setMinimumHeight((int)(displayRectangle.height() * 0.9f));
dialog.setView(layout);