2

Consider:

Uses FMX.VirtualKeyboard, FMX.Platform;

procedure TForm1.Button1Click(Sender: TObject);
    var Keyboard: IFMXVirtualKeyboardService;
    begin
        keyboard := TPlatformServices.Current.GetPlatformService(IFMXVirtualKeyboardService) as IFMXVirtualKeyboardService;
        if  TVirtualKeyboardState.Visible in keyboard.VirtualKeyBoardState then
        begin
            Keyboard.HideVirtualKeyboard;
        end;
    end;

HideVirtualKeyboard is running with this code, but how is ShowVirtualKeyboard run on the Delphi FireMonkey Android platform?

Because for the same code, ShowVirtualKeyboard is giving:

not enough actual parameters error in code page

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
moorker
  • 105
  • 2
  • 13

1 Answers1

2

The ShowVirtualKeyboard method expects to receive one parameter indicating which control the keyboard will type into. For example, to show the keyboard for typing into a memo control:

procedure TForm1.Button1Click(Sender: TObject);
begin
  keyboard := TPlatformServices.Current.GetPlatformService(IFMXVirtualKeyboardService) as IFMXVirtualKeyboardService;
  keyboard.showVirtualKeyboard(memo1);
end;
Rob Kennedy
  • 161,384
  • 21
  • 275
  • 467
moorker
  • 105
  • 2
  • 13