try the next solution:
extend from dialog, and set the exact view to use by using setContentView .
the alertDialog is used for some functionalities. it's not that it can do anything you want.
maybe instead of extending you could take the dialog and then use the setContentView.