简体   繁体   English

动态壁纸为Android XML

[英]Live wallpaper for android xml

Is it possible to use xml layouts in live wallpapers. 是否可以在动态壁纸中使用xml布局。 I have spent countless hours trying to code. 我花了无数小时尝试编码。 Have also read numerous books and logs. 还阅读了许多书籍和日志。 But still no answer 但是还是没有答案

A live wallpaper must do all of its drawing using the Surface and Canvas APIs. 动态壁纸必须使用SurfaceCanvas API进行所有绘制。 You could try to inflate some Views from XML and draw() them to a Canvas but it's probably more trouble than it's worth. 您可以尝试从XML扩展一些视图,然后它们绘制()到Canvas中,但这可能比其价值更大。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM