-1

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

Dalija Prasnikar
  • 27,212
  • 44
  • 82
  • 159
zac
  • 4,495
  • 15
  • 62
  • 127
  • Windows, Mac, iOS or Android? What controls are we looking at? – David Heffernan Jul 19 '15 at 17:14
  • 1
    Please edit the question to add the missing details. Frankly you should know how to do this by now. – David Heffernan Jul 19 '15 at 17:29
  • If I'm not mistaken, the virtual keyboard always covers the bottom area. Almost all mobile apps (iOS and Android) have such buttons on the top. Not saying it's impossible, just not common. You should consider making your app follow the common practice of most other apps on the market. – Jerry Dodge Jul 19 '15 at 18:45
  • @JerryDodge Yes I am trying to follow the standard, the pictures above are from Android KitKat, from Settings, Security, Pin Menu so it should be standard ? also can you give a picture link to know what you mean ? – zac Jul 19 '15 at 18:58

1 Answers1

1

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\"

zdzichs
  • 205
  • 2
  • 6
  • In KeyboardToolbar I found it is not possible to add Android as a target, how they do that ? – zac Jul 19 '15 at 23:43
  • 1
    I believe that it is hardcoded somethere in *.proj file. Recreating the project from pure *.dpr *.pas *.fmx allows to add Android target. But the readme states: "the virtual keyboard service is not available for Android devices". So this example is only for ios mobile target. You should follow the ScrollableForm solution. – zdzichs Jul 20 '15 at 11:48