문제

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