Based on the code here, http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog . I am successfully able to create a custom dialog with background and buttons ins
Make a class like this:
public class CustomDialog extends Dialog {
public AlertFinishiView(Context context) {
super(context);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.dialog);
getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
}
}
make a xml in layut folder with this name dialog
add the image above in your drawable folder with name bg_custom_dialog.9.png
call in your activity:
CustomDialog customDialog = new CustomDialog(this);
customDialog.show();