I have a strange problem with admob sometimes only showing a small slice of the ad. Sometimes it is completely fine, However other times just shows the top (say the top 5%), and therefore there is an add there. I am putting them in OpenGL 1x as follows:
GLSurfaceView mGLSurfaceView;
LinearLayout ll;
FrameLayout fl;
AdView adView;
mGLSurfaceView = new GLSurfaceView(this);
mGLSurfaceView.setRenderer(this);
adView = new AdView(this, AdSize.BANNER, "xxxxxxxxxx");
adView.loadAd(new AdRequest());
ll=new LinearLayout(this);
ll.addView(adView); // put in LinearLayout, as the ad can't be moved in layout but the layout can be moved when child of another layout
fl = new FrameLayout(this);
fl.addView(mGLSurfaceView);
fl.addView(ll); // LinearLayout with ad put in FrameLayout. FrameLayout allows us to put other layouts within it where you want.
ll.setPadding(0, 5 /* amount of pixels from top*/ , 0, 0);
ll.setHorizontalGravity(0x11 /*center*/);
setContentView(fl);