How can i visible/invisible the virtual keyboard in FireMonkey app manually?

  

for develop video game purpose, recently i am trying to write a DirectUI component library using Delphi based on FMX, by now i have got Button、Label、CheckBox done, and they seems perfect when the demo running.
But, when i write the Edit/Memo control, and set it focused, i want to make the virtual keyboard visible manually, so i write following codes:
procedure ShowHideVirtualKeyboard(const AControl: TFmxObject; Show: Boolean);
var
Svc: IFMXVirtualKeyboardService;
begin
if TPlatformServices.Current.SupportsPlatformService(IFMXVirtualKeyboardService, Svc) then
begin
if Show then
Svc.ShowVirtualKeyboard(AControl)
else
Svc.HideVirtualKeyboard;
end;
end;

It do works on Windows, but failed on Android. i looked through FMX soure code, and find that the control must be derived from TControl.
So, if my conponents are derived from TInterfacedObject(that is: TDxBaseControl = class(TInterfacedObject)), is it possible to make the virtual keyboard visible manually?
Thank you very much!

Comments are closed.