问题
When I use Samsung MultiWindow feature with my app AdMob stops loading ad and log such error:
Not enough space to show ad. Needs 961x49 dp, but only has 471x50 dp.
AdMob has SmartBanner size. If I set fixed banner size than it partially solves problem - sometimes ad is showing, sometimes I had the described error. It may show ad for size AxB and after few multi window border changes show error "Needs DxE dp, but only has AxB dp".
AdMob view is correctly resizing when I change windows size, the problem only with requesting ad with incorrect size.
May be somebody had similar problems with AdMob?
回答1:
The error is pretty clear. At some point you are not giving the ad enough height to be shown. Review your layout. Something is claiming too much space.
来源:https://stackoverflow.com/questions/26583005/admob-in-samsung-multiwindow-mode-resize-issue