红鱼儿

Delphi 11.2的一个问题

https://quality.embarcadero.com/browse/RSP-39499

function TAndroidVirtualKeyboard.DefineNativeView(const AObject: TFmxObject): JView;
 
  function IsNativeControl: Boolean;
  begin
    Result := (AObject is TPresentedControl) and (TPresentedControl(AObject).ControlType = TControlType.Platform);
  end;
//这段代码,需要改写成下面这样:
function TAndroidVirtualKeyboard.DefineNativeView(const AObject: TFmxObject): JView;
 
  function IsNativeControl: Boolean;
  var
    ControlTypeSupportable: IControlTypeSupportable;
  begin
    Result := Supports(AControl, IControlTypeSupportable, ControlTypeSupportable) and
              (ControlTypeSupportable.ControlType = TControlType.Platform);
  end;

 

posted on 2022-09-23 23:01  红鱼儿  阅读(518)  评论(0编辑  收藏  举报