I have a libgdx game that uses scene2d
for the UI. I have several ImageButton
instances with its own ClickListener
. On some devices (only seen it on Samsung Galaxy S3 and Samsung Galaxy S4 Active so far) there is a problem with the event not being delivered unless one clicks twice quickly.
Every time a click fails something like the following is logged:
04-22 16:10:09.678: D/InputReader(728): Input event: value=1 when=20897610551000
04-22 16:10:09.678: I/InputReader(728): Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.889 ] when=20897610612000
04-22 16:10:09.678: I/InputDispatcher(728): Delivering touch to: action: 0x0
04-22 16:10:09.678: I/InputDispatcher(728): Delivering touch to: action: 0x3
04-22 16:10:09.688: W/InputEventReceiver(728): Attempted to finish an input event but the input event receiver has already been disposed.
04-22 16:10:09.688: W/InputEventReceiver(728): Attempted to finish an input event but the input event receiver has already been disposed.
04-22 16:10:09.688: V/WindowManager(728): Window{43478730 u0 Keyguard}mOrientationRequetedFromKeyguard=false
04-22 16:10:09.698: D/STATUSBAR-StatusBarManagerService(728): manageDisableList what=0x0 pkg=WindowManager.LayoutParams
04-22 16:10:09.788: D/InputReader(728): Input event: value=0 when=20897720902000
04-22 16:10:09.788: I/InputReader(728): Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=20897720902000
I assume the statement Attempted to finish an input event but the input event receiver has already been disposed. is key here, but I can't really see why it would work when one click one more time quickly.
What could the reason for this be? How can I debug this further to get to the bottom of this? Any clues?
Edit: All log lines except the two last ones appears on touch down, while the last two appears on touch up. My event listener is for on click.