requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().setBackgroundDrawable(
new ColorDrawable(android.graphics.Color.TRANSPARENT));
Note: wirte AboveCode in OnCreate if create Activity As Custom Dialog
=======================================================================
LayoutInflater dailog = LayoutInflater.from(context);
final View deleteDialogView = dailog.inflate( R.layout.dailog_popup(Your Xml Layout Name), null);
Dialog alertdailog = new Dialog(context);
alertdailog .requestWindowFeature(Window.FEATURE_NO_TITLE);
alertdailog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
alertdailog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
alertdailog.setContentView(your View Name);
alertdailog.setCanceledOnTouchOutside(true);
alertdailog.show();
No comments:
Post a Comment