JGuizard
8/11/2015 - 5:43 PM

CustomDialogMethod.java

    public void customDialog()
    {
        final Dialog dialog = new Dialog(this);
        dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
        dialog.setContentView(R.layout.dialog_custom);
        dialog.setCanceledOnTouchOutside(true);
        
        Button btOk=(Button)dialog.findViewById(R.id.btOk);
       btOk.setOnClickListener(new View.OnClickListener()
        {
            @Override
            public void onClick(View v)
            {
                dialog.dismiss();
            }
        });
    }