I am trying to integrate Inmobi banner ads into my app programmatically but I'm having a problem regarding the size of the banner ad. I have the following code snippet in my Launcher class:
RelativeLayout.LayoutParams bannerLp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
bannerLp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
bannerLp.addRule(RelativeLayout.CENTER_HORIZONTAL, RelativeLayout.TRUE);
layout.addView(bannerAd, bannerLp);
setContentView(layout);
bannerAd.load();
It doesn't show any ad on phone. But when I set the hight parameter from WRAP_CONTENT to 80. It fits perfectly at the bottom. But when tried same on a phone with bigger screen size, it appears small. I used the same code snippet for AdMob ads and havent faced this difficulty. I had always set the with parameter as MATCH_PARENT and height parameter as WRAP_CONTENT. Why is it no displaying anything when using Inmobi?