如何在Delphi Firemonkey中使用吐司? [英] How do I use toast in Delphi Firemonkey?

查看:55
本文介绍了如何在Delphi Firemonkey中使用吐司?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Delphi XE5中使用Android的 toast ?

How do I use Android's toast in Delphi XE5?

我尝试使用库 FMX.AndroidLike.Toast ,但是在执行过程中系统在 Toast 出现之前关闭.

I tried to use the library FMX.AndroidLike.Toast but the system is closing during execution before the Toast shows up.

推荐答案

我知道您已经知道了...但是对于其他人...以防万一.

I know you know already ... but for others ... just in case.

您需要安装该组件,将其添加到要显示敬酒消息并致电...的表单中.

You need to install the component, add it to the form on which you want to show toastmessages and call ...

componentname.now('Your toastmessage string');

如果要使用基于组件的方法,请不要忘记添加Unit FMX.Androidlike.Toast.该组件可以在外观上进行配置(还可以配置显示消息的持续时间).

Do not forget to add the Unit FMX.Androidlike.Toast if you want to use the component based approach. The component can be pretty much configured in appearance (also the duration how long the message is shown).

如果要使用Brians单元的JNI方法,请使用Android.JNI.Toast并调用过程

If you want to use the JNI approach of Brians unit use Android.JNI.Toast and call the procedure

toast('Your toastmessage string', youroptionaltoastduration);

您可以找到该组件,现在还可以找到

You can find the component and now also a link to a screencast on

https://www.cybertribe.de/info/components/fmx/toast/

这篇关于如何在Delphi Firemonkey中使用吐司?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆