Код: Выделить всё
@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);
}
}
Код: Выделить всё
DecorView
Какой код следует использовать для правильного поворота AlertDialog?
Подробнее здесь: https://stackoverflow.com/questions/798 ... -correctly