开发者

SlidingDrawer get's behind Admob ad

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)开发者_StackOverflow社区;
 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?


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.


Try setting the weight of the sliding drawer to greater than the AdView. That should fix it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜