Android Question Activity height after rotation with keyboard open

Controller

Member
Licensed User
Longtime User
Following issue:
When the soft-keyboard is open and I rotate, the activity gets reloaded but the height (e.g. 100%y) is incorrect (still reserving place for the soft-keyboard plus about 1 cm?)
Not only during activity_create event, but also during the runtime (or until next rotation)
While in this state, the new height value in IME_HeightChanged events appears to be correct, as far as I can assume from scrolling the resized listview (the listview appears to be clipped around this incorrect 100%y, so I guess the real 'activity' height is incorrect)

SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)
is set in the manifest file.

IME.Initialize("IME")
IME.AddHeightChangedEvent
is the first code in activity_create

IME.HideKeyboard
within activity_pause does not help either.

The code handling IME_HeightChanged only affects a single control, so not the reason for this behavior.

Anyone any idea?
 

Controller

Member
Licensed User
Longtime User
Sample, plus screenshot
 

Attachments

  • RotationBug.zip
    332.1 KB · Views: 147
  • SC20140424-121034.png
    SC20140424-121034.png
    28.3 KB · Views: 163
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

Controller

Member
Licensed User
Longtime User
Hm. Sounds pretty much stuff for testing.
Will this be fixed for B4A (and if, when avaible)?
Or any simple trick, e.g.
- code to restore real size on startup (bzw, using 100%x/y always reads the activity height/width?) ?
- code to hide keyboard before resize (activity_pause?)
Basicly, I need the height-change stuff only to adjust one listview, while the rest stays as is. Maybe I'll remove all that keyboard resizing at all (hoping this will fix the issue)
 
Upvote 0
Top