0

I have a ListView with an edittext and a button at the bottom of my screen. When the soft keyboard appears it squeezes my image. I tried a few stuff:

1)android:windowSoftInputMode="adjustPan" The image doesn't get squashed, nice. But the ListView items cannot be scrolled anymore.

2)android:windowSoftInputMode="adjustResize" Does nothing.

Any ideas anyone?

maw
  • 1
  • 1
  • 2

2 Answers2

3

Use getWindow().setBackgroundDrawable() in your activity to set the background.

Rohit
  • 31
  • 2
0

Use android:windowSoftInputMode="adjustResize" and simply wrap your background to a ImageView in a ScrollView.

<ScrollView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:scrollbars="none"
    android:overScrollMode="never">
    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/> 
</ScrollView>
bapho
  • 858
  • 8
  • 13