Admob 广告不会显示在对话框主题活动中
我所拥有的是一个简单的活动,其中包含一些内容。就在它的下面,我有一个 admob 广告。而且效果很好。
但是,当我将 android:theme="@android:style/Theme.Dialog"
添加到清单中的活动时,活动仍然会加载,内容会加载,但广告不会加载。
如果我只是删除 android:theme="@android:style/Theme.Dialog"
并将该活动视为常规活动,它会再次正常工作。但是,我需要它在对话框中工作:/那么,我能做什么?有人有同样的问题吗?
也许是 admob 错误?我只是不明白为什么这不起作用
What i have is a simple activity with some content inside of it. Right below that I have an admob ad. And it works great.
However, when i add android:theme="@android:style/Theme.Dialog"
to the activity in the manifest the activity still loads, the content loads, but then the ad will NOT load.
If i simply delete android:theme="@android:style/Theme.Dialog"
and view the activity as a regular activity it works fine again. But, I need this to work in a dialog :/ So, any ideas what I could do? Anyone have the same issue?
Maybe an admob bug? I just don't see why this isn't working
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可以让广告显示在对话框中。我必须以横向布局显示对话框,因为纵向模式下没有足够的空间容纳广告(因为广告占据了屏幕的整个宽度)。但是,点击广告不会执行任何操作(广告不会重定向到广告商网站)。
I can get the Ad to display in a dialog. I had to display the dialog in landscape layout because there is not enough room for the Ad in portrait mode (as the ad takes up the full width of the screen). However, clicking on the ad does nothing (the ad does not redirect to the advertisers site).