8

While the keyboard is open a white strip appears at the top of the screen, and it persists regardless of a keyboard state change.

If I a use adjustPan then it works, however, I want to use adjustResize only.

Here is an image of the problem:


My activity declaration in AndroidManifest.xml

<activity
    android:name=".MainActivity"
    android:screenOrientation="portrait"
    android:theme="@style/MyTheme"
    android:windowSoftInputMode="adjustResize"/>

<style name="MyTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="android:windowDrawsSystemBarBackgrounds" 
          tools:targetApi="lollipop">false</item>
</style>
chewpoclypse
  • 500
  • 5
  • 20
Hitesh Bhalala
  • 2,872
  • 23
  • 40

2 Answers2

1

There's a technique called Immersive Full-Screen Mode available in KitKat. I think it is now a preferred way to implement a fullscreen Activity.

This is an example from the docs.

Gaurav Sarma
  • 2,248
  • 2
  • 24
  • 45
-1

Remove this white strip from your activity's layout file. I can't say more as far as you don't provide your layout xml.

I advice you to use Hierarchy Viewer for layout debug.

naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259