Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. MYService myService = new MYService();
  2. myService.getDialog();
  3.  
  4. public void showMsg(){
  5. AlertDialog alertDialog = new AlertDialog.Builder(getApplication())
  6. .setTitle("Success!")
  7. .setMessage("Countdown")
  8. .setPositiveButton("Success", new DialogInterface.OnClickListener() {
  9. @Override
  10. public void onClick(DialogInterface dialog, int which) {
  11. }
  12. }).create();
  13.  
  14. alertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
  15. alertDialog.show();
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement