My new app uses a customlistview for displaying multiple edittexts in list form. The problem is that the keyboard covers up the items at the very bottom of the list. The user can only scroll so far. Once the keyboard is up, it is impossible to access the last couple of boxes without hiding the keyboard and then clicking on the boxes that were hidden and repeating this process.
Does anyone know of a simple fix for this?
Any help or direction would be greatly appreciated.
Actually this does not fix the problem. When I went to add the line to the manifest I discovered I already had it in there. There are two problems that can be caused in this type of example with customlistview, edittexts and the keyboard.
1. The keyboard covers up the edittext when near the bottom of the screen.
The link (manifest adjustpan addition) provided by Erel solves this problem
2. The screen is pushed up when the keyboard is launched and the edittext is visible. However, the user cannot scroll to the bottom of the list (and the lower edittexts) as the keyboard still covers those items. Once the keyboard is off the items are again visible underneath the area that the keyboard covered.
This is the current problem I am having and is not solved by the link above detailing adjustpan addition.
Attached is a short program that shows what I am talking about. Click on the edittext to the right of the "eleven" element. With the keyboard displayed try to scroll to the bottom of the customlistview.
Hi Dan .. as a worst case scenario , one option is to simply add half a dozen empty panels at the bottom of the SV.
Not elegant but it works .. the Panels have been disabled to stop user interaction.
see attach project. Hopefully a better solution will be offered..
Try this solution, tested on my Nexus 7 and it works perfectly. I expected that I would need to move the CustomListView to the correct scroll position but luckily it takes care of itself on the resize
B4X:
Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int)
Dim intKeyboardSize As Int = Max(NewHeight, OldHeight) - Min(NewHeight, OldHeight)
If NewHeight < OldHeight Then ' Keyboard displayed
customlist1.AsView.Height = customlist1.AsView.Height - intKeyboardSize
Else ' Keyboard hidden
customlist1.AsView.Height = customlist1.AsView.Height + intKeyboardSize
End If
End Sub