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,030
  • 21
  • 100
  • 124
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
  • 159,194
  • 20
  • 270
  • 458
moorker
  • 105
  • 2
  • 13