Toast的自定义动画进入/退出? [英] Custom animation for Toast enter/exit?

查看:267
本文介绍了Toast的自定义动画进入/退出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想自定义Toast的入口和出口动画.具体来说,我想使其立即显示(不淡入)并像正常情况一样消失(淡出).

I want to have my Toast's entrance and exit animations customized. Specifically, I want to make it appear instantly (no fade-in) and disappear like normal (fade-out).

有没有一种方法可以在吐司上使用动画?

Is there a way I can use animations with a toast?

推荐答案

使用无法更改的系统模板显示敬酒,所以简短的回答是不,您不能更改敬酒动画.

Toasts are displayed using a system template that can't be changed so short answer is no you cant change the toast animation.

不过,您可以制作自己的类似于烤面包的视图,并根据需要对其进行动画处理.

however you can make your own view that resembles a toast and animate it however you want.

这篇关于Toast的自定义动画进入/退出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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