Admob 广告放置在选项卡视图中时不会显示
我一直在尝试让我的广告以这种类型的布局展示。 选项卡 ->线性布局->列表视图->标头。标题通过 addHeaderView
设置并正常显示。如果我将广告移动到其他地方,它们会正常显示(所以这不是设置问题)。在我的其他项目中,在列表视图的标题中使用广告效果很好。
所以这似乎是一个非常具体的问题,当广告放置在 tabhost 内的列表视图的标题中时,广告只是拒绝显示。
我的日志根本没有显示来自 admob 的任何活动。这里要么是有 bug,要么是 sdk 的限制。有谁对这个问题有任何经验或见解吗?
编辑
我找到了解决方案。它实际上与我的 Tabview 根目录中的填充有关。有关更多信息,请查看我的答案此处
I've been trying to get my ads to display in this type of layout.
Tabs -> LinearLayout -> ListView -> header. The header is set via addHeaderView
and is displaying normally. If I were to move the ads anywhere else they display normally (so its not a setup issue). Using ads in the header of a listview works fine in my other projects.
So this seems to be a very specific problem, the ads simply refuse to display when placed in the header of a listview inside a tabhost.
My logs show no activity from admob at all. There is either a bug here or limitation of the sdk. Does anyone have any experience or insight into this issue?
EDIT
I found the solution. It actually had to do with padding that was in the root of my Tabview. For more checkout my answer here
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如我在编辑中提到的,问题与视图中的填充有关。我此处回答了另一个问题
As I mentioned in the edit, the issue has to do with padding in the views. I answered another question here