动画静态布局

发布于 2024-12-20 10:40:00 字数 156 浏览 3 评论 0原文

对于动态壁纸项目,我在画布上使用 StaticLayout 来绘制一些文本。我打算使用 alpha 动画淡出文本,但我在网上和 SO 上遇到的所有示例都是用于动画视图。

由于我不使用 TextView,有什么方法可以将动画应用到 StaticLayout 吗?任何指示都会有所帮助。

For a live wallpaper project, I am using a StaticLayout on a canvas to draw some text. I intend to use alpha animation to fade out the text but all the examples I have come across on the net and on SO are for animating views.

As I do not use TextView, is there any way I can apply the animation to StaticLayout instead? Any pointers would help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

噩梦成真你也成魔 2024-12-27 10:40:00

您可以设置用于静态布局的绘制的 alpha 值。

You could set the alpha value on the paint used for the staticlayout.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文