We can create a dialog with custom alert dialog with our xml in android. But for making simple alerts we can make custom alerts through code itself. Here is a simple function for this. Here I am having a Listview and an edittext with two buttons in the alertBox. Please leave your valuable comments on this post.