Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. @Override
  2. public Dialog onCreateDialog(final Bundle savedInstanceState) {
  3. // the content
  4. final RelativeLayout root = new RelativeLayout(getActivity());
  5. root.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
  6. // creating the fullscreen dialog
  7. final Dialog dialog = new Dialog(getActivity());
  8. dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
  9. dialog.setContentView(root);
  10. dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.WHITE));
  11. dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
  12. return dialog;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement