Rotate creative review using API 8

I use OpenGL in the RenderSurface View in my Android game. The game uses the landscape as the orientation of the screen, but I want to place an ad 90 Β° at the bottom of the phone. (As if I would use a portrait as a screen orientation)

This is the only way to advertise without making the game unplayable on small screens. I decided to do this with:

View.rotate(..)

The problem is that this feature is first available with API level 11.

  • Is there a way around this with API level 8?
  • I have already tried rotation animation, but touch events are not delivered correctly. (The adview prevents a workaround)

I would drastically reduce my user base if my game only plays with Android 3.0.

+5
source share
1 answer

I wonder if you could do something like this? Sorry, I don’t have 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 content presentation on top of the opengl superficial review, maybe .... well, as I said, there is no time to test it. give him a chance?

+1
source

All Articles