Question

I'm doing a quick log statement in the MainActivity and getting two Enter key presses logged whenever the physical Enter key is pressed on the ASUS Transformer tablet physical keyboard. The key is not being held down.

public boolean dispatchKeyEvent(KeyEvent event) is the method being called when this occurs, twice each time.

Any ideas?

Was it helpful?

Solution

one is for onKeyDown and one is for OnKeyUp. so it will be having two call for every action. as you mentioned the key is not being held so it will log twice

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top