如何在动态壁纸的预览屏幕中放置广告横幅?
如萤火虫动态壁纸 (http://www.livewallpapers.org/fireflies-free- 1543/),我不知道如何在预览屏幕(而不是设置屏幕)中放置广告横幅。
附加信息:当我在 Android 2.2.1 上的 HTC 上安装萤火虫壁纸时,横幅会显示在预览和设置屏幕中,但在我的另外两台索尼爱立信(2.3.3 上)上,我只能在设置屏幕。这和索尼爱立信或者安卓版本有关系吗?
谢谢。
PS我确实查看了此链接,但没有找到我的问题的答案:
As in the Fireflies live wallpaper (http://www.livewallpapers.org/fireflies-free-1543/), I don't know how to put an ads banner in the Preview screen (not Settings screen).
Additional info: when I install the Fireflies wallpaper on my HTC which is on Android 2.2.1 the banner shows up in both Preview and Settings screens, but on my two other Sony Ericsson (on 2.3.3) I can only see the banner in the Setting screens. Does that have something to do with Sony Ericsson or the version of Android?
Thank you.
P.S I did look at this link but found no answer to my question:
How do I put an admob adview in the settings screen for a live wallpaper?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建一个新类 AdPreference.java 并包含以下代码:
在 res/layout 文件夹中创建一个新的 xml 布局,标题为 ad_layout.xml 必须准确。然后包含此代码:
然后在您的“设置”xml 中的 xmlns 行之后添加此代码:
在您的 AndroidManifest.xml 中添加此代码 也在
您的清单中添加此代码:
就是这样。它会完美地工作。
Create a new class AdPreference.java and include this code:
In your res/layout folder create a new xml layout titled ad_layout.xml has to be exact. Then include this code:
Then in your "settings" xml add this right after the xmlns line:
In your AndroidManifest.xml add this before
Also add this in your manifest:
And that's it. It'll work perfectly.