Admob ads will not display when placed inside a tabview

纵饮孤独 提交于 2019-12-11 16:51:58

问题


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


回答1:


As I mentioned in the edit, the issue has to do with padding in the views. I answered another question here



来源:https://stackoverflow.com/questions/3705651/admob-ads-will-not-display-when-placed-inside-a-tabview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!