简体   繁体   English

将自定义视图嵌入到Android主屏幕小部件中

[英]Embed custom view in android home screen widget

I am building a home screen widget and I want to add an advertisement to it. 我正在构建一个主屏幕小部件,我想向其添加广告。 Currently the advertises SDK provides a custom view widget which I tried to embed in my home screen widget. 目前,advertises SDK提供了一个自定义视图窗口小部件,我尝试将其嵌入到主屏幕窗口小部件中。 But when I add it, it says problem loading widget. 但是,当我添加它时,它提示加载小部件有问题。 I'm guessing I can't add custom views to a widget? 我猜我无法将自定义视图添加到窗口小部件? Could someone clarify or tell me how I could add an advertisement to my home screen widget. 有人可以澄清或告诉我如何将广告添加到主屏幕小部件中。

Thank you 谢谢

Home screen widgets support very limited number of standard widgets. 主屏幕小部件仅支持有限数量的标准小部件。 You can't use custom widgets for them. 您不能为其使用自定义窗口小部件。 See App Widgets . 请参阅应用程序小部件

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

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