質問

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?

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top