Custom Dialog in Android - (XML File Dialog) - AndroidCode

STEP 1: On a Button Click Open Dialog



 AlertDialog.Builder builder new AlertDialog.Builder(ShowActivity.this);

final View view = getLayoutInflater().inflate(R.layout.dialog_info, null);
builder.setView(view);
AlertDialog dialog = builder.create();
dialog.setCancelable(true);
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
dialog.show();



STEP 2: Create Dialog XML


create xml file accroding your needs...