1

I have a listview with number of edittext as a child. When i start writing text in the editext than editext hides itself to back of the keyboard in Samsung Galaxy 10" tablet. How can i set the edittext always above the keyboard? I have also used adjustSpan & adjustResize in the manifest but failed to do so. Please let me know where i am lacking in my code. Any sort of help would be appreciable.

Thanks in advance.

AkashG
  • 7,868
  • 3
  • 28
  • 43

2 Answers2

12

Put adjustResize inside activity tag in manifest, it will adjust the focused view above of the soft keyboard.

android:windowSoftInputMode="adjustResize|stateHidden"

Also Check this link for more help

EDIT:

Also if it doesn't help try adding following code in your listview xml:

android:descendantFocusability="afterDescendants"

Hope this helps.

Marko
  • 20,385
  • 13
  • 48
  • 64
TheLittleNaruto
  • 8,325
  • 4
  • 54
  • 73
  • 2
    I had a ListView with some cells that have EditText. I wanted the Activity to be set as adjustResize so that the user can scroll while the keyboard is displayed to see items hidden behind it. The problem was the edit text would require two taps to focus. `android:descendantFocusability="afterDescendants"` did the trick. Thanks – pnavk Feb 18 '16 at 17:59
  • @pnavk Glad it helped :) – TheLittleNaruto Feb 18 '16 at 18:13
0

Set focusable true for edittext

android:focusable="true"
Marko
  • 20,385
  • 13
  • 48
  • 64
Macrosoft-Dev
  • 2,195
  • 1
  • 12
  • 15