You should use AlertDialog.Builder.setView(your_layout_id)
, so you don't need to inflate it.
Use AlertDialog.findViewById(your_view_id)
after creating the dialog.
Use (AlertDialog) dialogInterface
to get the dialog
inside the OnClickListener
and then dialog.findViewById(your_view_id)
.