We need to have access to the dialogView for the cases when we want to present editText inside the alertDialog to set WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM flag for the dialog.
Otherwise keyboard is not showing on the screen.
More details here: https://developer.android.com/reference/android/app/AlertDialog
This will also give flexibility to do with the AlertDialogView whatever the developer wants (update some margins, have direct access to the views) which is not needed in 99% of the cases, but for some specific cases can still be usefull.
We need to have access to the dialogView for the cases when we want to present
editText
inside the alertDialog to setWindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM
flag for the dialog. Otherwise keyboard is not showing on the screen. More details here: https://developer.android.com/reference/android/app/AlertDialogThis will also give flexibility to do with the AlertDialogView whatever the developer wants (update some margins, have direct access to the views) which is not needed in 99% of the cases, but for some specific cases can still be usefull.