7

I've got a container view that I'd like to stay at the bottom of my view at all times that sits below a ScrollView. The ScrollView has a handful of UI objects, one being a EditText object. Currently, when the user taps inside of the EditText object, the android-softkeyboard appears, and brings the container view with it, and blocks some UI objects. How can I get that container view to stay at the bottom of the layout at all times and not move with the keyboard when it appears?

Here's a screenshot - http://d.pr/3LQ2

Here's my layout.xml - http://d.pr/HmXC

Thanks in advance, Cole

Cole
  • 676
  • 8
  • 24
  • 5
    your images link doesn't work any longer. You should add them through stackoverflow so they stays. – Warpzit Nov 11 '12 at 06:26

2 Answers2

16

In manifest add in activity tag:

android:windowSoftInputMode="adjustPan"
pawelzieba
  • 16,082
  • 3
  • 46
  • 72
0

Try moving your container view inside the scrollview. Your view moves up because the scrollview is seen as "resizable" by Android (since it's scrollable, height doesn't matter) and thus other objects will push it up.

So either

1) Move your container inside your scrollview, or

2) Remove the scrollview wrapper.

Or find some other workaround. : )

Nathan Fig
  • 14,970
  • 9
  • 43
  • 57
  • 1) by moving the container view inside of the ScrollView, i got this error: ERROR/AndroidRuntime(31727): Caused by: java.lang.IllegalStateException: ScrollView can host only one direct child – Cole May 25 '11 at 14:29
  • That's correct - a ScrollView can only have one direct child, but you can wrap multiple children in a single Layout within the ScrollView. – Nathan Fig May 25 '11 at 17:14