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);