0

I made an Android App that contains an EULA, to make the EULA I used the Dialog class (android.app.Dialog). But when the EULA shows, to not agree to it (escape it) you can press the Back Button which isn't very good and definitely not what I want to happen.

I want to use the Dialog class because it really helps keep my code short and simple(I tried making another activity instead of Dialog)

Any ideas of how to prevent skipping EULA?

-Please Help

user2990508
  • 255
  • 1
  • 4
  • 11

1 Answers1

1

Referring to the doc, you can disable the back button behaviour by setting

dialog.setCancelable(false);
Lawrence Choy
  • 6,088
  • 1
  • 20
  • 30
  • Thank's, I tried many things like overriding the onBackPressed() function and setting a onKeyDown event. And this one's just that simple. One line of code is all it takes. – user2990508 Nov 18 '13 at 02:04