I have just overide my back button in my code like this
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
return true;
}
return super.onKeyDown(keyCode, event);
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
{
startActivity(new Intent(context,
MainDialog.class));
finish();
return true;
}
return super.onKeyUp(keyCode, event);
}
Now I am facing a weird problem,
I have a edit text on the current Activity.
When I am trying to close the virtual keyboard by pressing the back
button .
My Application finishes...
But I just want to close the keyboard not the Avtivity..
Any suggestion to solve my issue..?
Thanks in advance,
Tanmay
--
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