Hello!
I'm writing my opengl native game. Menu is using android api, game
field using native lib ( c++ and opengl ). All in one activity
( different views ).
If I press Back or Home button ( without overriting onKeyDown() ) all
is fine: game just quit to desktop and when I again running, it saving
its state. But I was needed to overrite Back and Menu button:
public boolean onKeyDown(int keyCode, KeyEvent event)
{
super.onKeyDown(keyCode, event);
if(keyCode == KeyEvent.KEYCODE_MENU || keyCode ==
KeyEvent.KEYCODE_BACK)
{
// some code
return true;
}
return false;
}
Than I quit throught Home button and again run it. Sometimes all is
fine, but sometimes I see only my menu, and black screen where the
opengl must be. What's the problem?
Also I was trying to overrite Home button, but seems it's impossible..
Help me please.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en