Search code examples
androiddelphifiremonkeydelphi-xe8

How to always show bottom bar over popup virtual keyboard


I am using Delphi XE 8 to build Android app and I have a form that have two buttons at the bottom like this one

enter image description here

How I make sure these buttons still visible when the virtual keyboard appear and position back to the bottom when the keyboard disappear ?, effect would be like this screen:

enter image description here


Solution

  • Please take a look at Embarcadero example: FMX.Mobile.ScrollableForm Sample and add an extra TLayout with bottom buttons (cancel/continue) - the position of this layout should be assigned according to bounds from VirtualKeyboardShown event handler. There is also another, similar example called KeyboardToolbar. The examples can be also found in "c:\Users\Public\Documents\Embarcadero\Studio\16.0\Samples\Object Pascal\Mobile Samples\User Interface\"