Я использую этот код: [code]@Override protected void onResume() { super.onResume();
AlertDialog d = new AlertDialog.Builder(this) .setTitle("This is the Dialog Title") .setMessage("This is the Test message") .setPositiveButton("Positive Button", (dialog, which) -> { dialog.dismiss(); }) .create();
rotateDialog(d);
d.show(); }
public static void rotateDialog(Dialog curDlg) { Window window = curDlg.getWindow(); if (window != null) { View decorView = window.getDecorView(); decorView.setRotation(-90); } } [/code] До вращения диалоговое окно выглядит правильно. Но после поворота на Эмуляторе обрезается. ([code]DecorView[/code] визуализируется с помощью LayoutInspector). [img]https://i.sstatic.net/AJaNgYY8.png[/img]
Какой код следует использовать для правильного поворота AlertDialog?