I want to show the admob ads like the following. My game is locked in landscape mode, and I want to show the ads vertically. I used the XML layout to placed my ads.
Asked
Active
Viewed 2,646 times
1
-
Not yet, now I used other way to place my adview, but I also want to know how to place the adview like this. – pixeloverflow Apr 17 '11 at 05:50
-
could you share your code? I am trying to do the same thing and somehow it doesn't work – morpheus Dec 21 '15 at 20:22
1 Answers
3
To do this, you would have to create a custom View
that extends the AdMob View, then override the onDraw()
method. Because there is no source code available for the AdMob View (that I know of), however, this may be impossible. If you had the source of the AdMob onDraw()
method, it could be simply an issue of swapping the x and y variables.
Another option is to keep your Activity in Portait mode, and then override your own Views' onDraw()
method to draw it in landscape. This would be a lot of work though, as you'd have to create your own custom views for buttons, image layouts, etc.

Tom11
- 2,419
- 8
- 30
- 56

John Leehey
- 22,052
- 8
- 61
- 88