android - Back Key code not working -


hey have following code within application, when use button close music activity or main menu not seem work music still plays when button has been pressed exit app. work film activity/film clips explain may problem?

i not errors:

@override public boolean onkeydown(int keycode, keyevent event) {     if ((keycode == keyevent.keycode_back))     {         this.finish();     }     return super.onkeydown(keycode, event); } 

you can use in activity

 @override public void onbackpressed() {     this.finish(); } 

Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -