删除广告或隐藏的AdView [英] Remove Ads or Hide AdView

查看:144
本文介绍了删除广告或隐藏的AdView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想2分钟后隐藏来自AdMob的广告,我所做的是,2分钟后,我会停下来,要求新的广告和隐藏的AdView,已经写了

I'm trying to hide the Ads from AdMob after 2 minutes, what I've done is, after 2 minutes, I'll stop requesting fresh ad and to hide AdView, have written

if (adView.getVisibility() == AdView.VISIBLE)
     adView.setVisibility(AdView.GONE);

发生了什么是广告变为不可见,但仍然占据了空间,而不是释放它。我想释放空间。

what's happening is Ad becomes invisible but still occupies the space, not releasing it. and I want to release that space.

任何想法,先谢谢了。

推荐答案

我处理的线程内这个功能,这就是为什么我例外,它没有释放空间,而不是现在的我用线程处理程序来处理的功能,现在它的做工精细,现在它不占用任何空间。

I handled this function inside a thread, that's why I got exception and it didn't releases the space, instead now I used Thread Handler to handle the function and now its working fine and now its not occupying any space.

这篇关于删除广告或隐藏的AdView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆