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

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -