键盘打开时 Admob 广告消失:s
我有一个活动,其中有编辑文本和按钮, 遵循下面的概念格式
[编辑文本] [按钮]
[广告]
我的问题是,当我的键盘在横向视图(软键盘)中打开时,触摸编辑文本以明显输入某些内容后,广告就会消失。 键盘似乎与广告接触(视觉上),并且由于某种原因它删除了广告并将活动推高了一点(除了删除广告之外是正常的)。
知道我如何解决这个问题,或者我可以在哪里检测到键盘关闭时可以重新加载广告吗?
I have an activity which has an edite text and a button,
following the concept format below
[EDITE TEXT] [BUTTON]
[ADVERT]
My problem is, when my keyboard opens in landscape view ( soft keyboard ) after touching the edit text to obviously input something, the ad dissapears.
The keyboard seems to come in contact with the ad (visually) and for some reason it removes the ad and pushes the activity up abit (normal besides removing the ad).
Any idea how i could either fix this issue, or where i could detect when the keyboard is closed the ad can be reloaded ??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该将 AdView 作为布局的 RootView 的直接子级。
You should put your AdView as direct child of RootView of the layout.
将其添加到 AndroidManifest.xml 中的活动声明中:
并将其添加到您的活动类中:
Add this to your activity declaration in the AndroidManifest.xml:
And add this to your activity class: