SlidingDrawer 落后于 Admob 广告
我有一个框架布局(我的主布局),我在上面绘制广告。
AdView adView = new AdView(this, AdSize.BANNER, "id");
FrameLayout v = (FrameLayout)findViewById(R.id.framemain);
v.addView(adView);
AdRequest request = new AdRequest();
request.addTestDevice(AdRequest.TEST_EMULATOR);
request.addTestDevice("41A48DB6B62384BDC3BEE5929AEC18DF");
adView.loadAd(request);
问题是,当拖动滑动抽屉时,其一部分仍保留在广告后面。有什么办法让这个工作吗?
I have a framelayout(my main layout), im drawing ads on it.
AdView adView = new AdView(this, AdSize.BANNER, "id");
FrameLayout v = (FrameLayout)findViewById(R.id.framemain);
v.addView(adView);
AdRequest request = new AdRequest();
request.addTestDevice(AdRequest.TEST_EMULATOR);
request.addTestDevice("41A48DB6B62384BDC3BEE5929AEC18DF");
adView.loadAd(request);
The problem is, that when dragging sliding drawer, part of it remains behind the ad. Any way to get this working?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最近添加的视图位于 z 顺序的顶部。因此,如果您最后添加此广告视图,它将绘制在顶部。
The most recently added view is at the top of the z-order. So if you add this ad view last, it will be drawn at the top.
尝试将滑动抽屉的权重设置为大于 AdView。那应该解决它。
Try setting the weight of the sliding drawer to greater than the AdView. That should fix it.