Android long key press -
I need to generate / trigger a long key press event of a button in Android.
Any help gladly?
From Android 2.0, activity includes the method
Public Boolean For example, on KeyLongPress (Int keycode, keyEvent event)
For example, a long key will press on the back button:
@Override Public Boolean KeyLongPress (int KeyCode, Key Event Event) {if (keycode == KeyEvent.KEYCODE_BACK) {/ / Your stuff here comes back to you; } Return SuperConnLongpress (keycode, event); }
Take a look.
Comments
Post a Comment