Android SoftKeyboardDetect: ignore this event, what does it mean?

I often see this debug message in LogCat. When scrolling or rotating the device, for example. Then the emulator does not respond to events. What does it mean?

You need to check the rotation on the emulator, but in some versions, when I press CTRL F12 or CTRL F11, nothing happens (well, the device rotates as a whole, but not on the screen), and I see this message in the log. I also did not find anything with Google ...

Well, that matters PhoneGap. I found something in the source code of PhoneGap:

/** * We are providing this class to detect when the soft keyboard is shown * and hidden in the web view. */ class LinearLayoutSoftKeyboardDetect extends LinearLayout { private static final String TAG = "SoftKeyboardDetect"; 

But I do nothing with a soft keyboard, I just rotate the device. Could this be a mistake?

+1
source share
2 answers

I can give you a backstory in this magazine. There is a bug in Android, or maybe they will call it a flaw, but no event occurs when opening or removing the keyboard. This causes problems for web applications as the keyboard reduces screen size. When the screen size becomes smaller, your user interface suffers.

To be able to respond to the show / hide keyboard in PhoneGap Android, we implemented LinearLayoutSoftKeyboardDetect, which is basically LinearLayout, but it responds to screen size changes. If you rotate the device, the width becomes height, and we can ignore the change, but if the height becomes much smaller and the width remains unchanged, we can assume that the keyboard is displayed, and we throw the show keyboard event. When the height becomes much larger and the width remains the same, we throw the keyboard event a hide. It makes sense?

+16
source

This implementation affects the situation β†’ When the built-in keyboard pops up, it reduces web browsing in the phone stutter. Dementia occurs again. Therefore, he tends to ignore necessary events. I want the on-site button to press a button on a keyboard.

+1
source

All Articles