I am using OpenGL in a RenderSurface View in my android game. The Game uses landscape as screen orientation but I want to place the ad 90° rotated at the bottom of the phone. (As it would be if I use portrait as screen orientation)
This is the only way I can place the ad without making the game unplayable on small screens. I maneged to do this with:
View.rotate(..)
The problem is that this function is first available with the API Level 11.
I would reduce my user base dramatically if my game is only playable with Android 3.0.
I wonder if you couldnt do something like this? Sorry I don't have the time to test :/
LinearLayout layout = new LinearLayout(this);
layout.setOrientation(LinearLayout.HORIZONTAL);
addContentView(layout, new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
RelativeLayout.LayoutParams adParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
adView = new AdView(this);
layout.addView(adView, adParams);
Since you are adding a content view over the opengl surfaceview perhaps.... well anyways like I said, no time to test it. give it a shot?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With