In the Android docs on AlertDialog, it gives the following instruction and example for setting a custom view in an AlertDialog:
If you want to display a
The android documents have been edited to correct the errors.
The view inside the AlertDialog is called android.R.id.custom
android.R.id.custom
http://developer.android.com/reference/android/app/AlertDialog.html