0

I am building an Android App. It is a WebView app using JQuery Mobile Version 1.4.0. My app is set in fullscreen mode with no titlebar. In the App there is a form with a textarea at the bottom of the page. When the textarea is focused the keyboard pops up but completely obscures the textarea so that the user cannot see what is being typed. I have read that setting the windowSoftInputMode to adjustResize is supposed to get round this problem:

android:windowSoftInputMode="adjustResize"

However it does not appear to work. Does anyone know how to get round this problem other than removing the fullscreen option.

amburnside
  • 1,943
  • 5
  • 24
  • 43
  • http://stackoverflow.com/questions/19849462/phonegap-android-how-to-adjust-layout-in-full-screen-mode-when-softkeyboard-is – Mithun Sreedharan Feb 26 '14 at 11:53
  • "adjustResize" will not work in fullscreen mode – Mithun Sreedharan Feb 26 '14 at 11:54
  • This is not an exact duplicate of the question mentioned as my Project is a WebView app. The answers given in the question do not seem to work on my app (maybe I am doing something wrong), however, I found altering the CSS on the Textarea solves the problem. See my own answer below. – amburnside Feb 26 '14 at 12:05

2 Answers2

0

android:windowSoftInputMode="adjustPan" should be suitable for your issue. From the docs:

Rather, the contents of the window are automatically panned so that the current focus is never obscured by the keyboard and users can always see what they are typing

http://developer.android.com/guide/topics/manifest/activity-element.html

super-qua
  • 3,148
  • 1
  • 23
  • 30
-1

I found another solution which works for me using CSS. If I set the height of the textarea to a fixed height the keyboard does not obscure the textarea:

textarea { height: 100px !important; max-height: 100px !important }

The use of !important is required to override the JQuery Mobile CSS

amburnside
  • 1,943
  • 5
  • 24
  • 43