Fisher Fisher - 3 years ago 192
Android Question

Android screen vertically desynchronization when run app

Our android app user reported they had display error situation like the picture below, on some tablets like these 2 :
Sony Xperia Z3 8 inch,
Google nexus 7 2013.
Both are Android 6.0.1, 1200x1920 resolution.

Is there any special setting needed to some tablet, Android 6.0.1 or resolution 1200x1920? Or does anyone has similar desynchronization happened on your app?

This display error is not reported on phones. Most of phones' resolution are 1080x1920 or less.

this is the screen shot

Answer Source

We've found the root cause. It's because we use the solution below to detect soft keyboard appearance and then hide some views. When the views are hidden, the value of "activityRootView.getHeight();" will become bigger. So, the threshold of "dpToPx(this, 200)", to check whether soft keyboard appears, need be carefully choose.

How to check visibility of software keyboard in Android?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download