firemonkey 去掉ios 虛擬鍵盤上的‘done’toolbar


firemonkey 去掉ios 虛擬鍵盤上的‘done’toolbar

BY:乖鳥

 

這個ios 虛擬鍵盤上的‘done’toolbar 簡直太丑了,不過可以在這個toolbar上自己增加按鈕,和功能,這倒不錯~~~,

首先uses: FMX.VirtualKeyboard  和 FMX.Platform

在 form的  private 中加入變量:

    FService: IFMXVirtualKeyboardToolbarService;

然后在FormCreate 中加入:

if TPlatformServices.Current.SupportsPlatformService(IFMXVirtualKeyboardToolbarService, IInterface(FService)) then
begin
  showmessage('搞定啦!!');
end
else
begin
  showmessage('還沒搞定呢!!!!');
end;
這一句應該是 給FService一個實例指針。不加這一句,FService是nil ,是空的。

這樣后 IFMXVirtualKeyboardToolbarService 中的方法,FService就可以使用了,包括增加按鈕等等。

下面這一句就可以去掉這個丑陋的工具條了:
if Assigned(FService) then
    FService.SetToolbarEnabled(false);


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM