I have a TabActivity which has the tabs across the bottom of the screen. My first tab hosts an activity which consists of a fixed header layout at the top of the screen, and a ScrollView beneath it which contains several EditText controls. The ScrollView scrolls it's content fine between the header bar and the bottom tabs, the problem occurs when an EditText is tapped and the soft keyboard appears. I understand to control the behaviour of the views when the keyboard appears I need to use the windowSoftInputMode
attribute in the manifest XML file. However I've tried both the following settings :
adjustResize
- Gives the correct functionality for the ScrollView and the header layout remains fixed at the top of the screen. However the tab bar controls are pushed up on top of the keyboard.
adjustPan
- The tab bar controls remain at the bottom of the screen beneath the keyboard (which is what I want) but the other views are pushed up by the keyboard meaning the header layout gets pushed up off the screen.
It seems I need characteristics of both settings, but they can't be used together. I've heard of the setting adjustNothing
but if I try this my project fails to build as it doesn't recognise this setting. I guess I need my tab host activity to have adjustPan
but my content activity to have adjustResize
but it seems you can't combine the two as it's the tab host activity that takes precedence.
Any help greatly appreciated.