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
I use this code and it work fine:
AlertDialog.Builder builder = new AlertDialog.Builder(contextActivity,android.R.style.Theme_Holo_Dialog_NoActionBar);
AlertDialog alertDialog = builder.create();
alertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
alertDialog.setView(myLayout,0,0,0,0);
alertDialog.show();