I use the latest AdMob SDK, My application is a portrait orientation mode 
with glSurfaceView as main view.

But I want the AdMob view to show as landscape mode for some efficient 
reason. I use Animation to rotate the view. See below:


<set>

<rotate xmlns:android="xxx" 
android:interpolator="@android:anim/linear_interpolator" 
android:fromDegrees="0" android:toDegrees="90" android:duration="0" 
android:pivotX="%50" android:pivotY="50%" android:repeatCount="0" />

<translate xmlns:android="xxx" 
android:interpolator="@android:anim/linear_interpolator" 
android:fromYDelta="0" android:toYDelta="200" android:duration="0" />

</set>


GLSurfaceView gameView = new GLSurfaceView(getApplication());

setContentView(gameView);


AdView adView = new AdView(this,AdSize.BANNER,"xxx");

Animation animation = 
AnimationUtils.loadAnimation(getApplication(),R.layout.rotate);

animation.setFillAfter(true);

adView.setAnimation(animation);

adView.loadAd(new AdRequest());


RelativeLayout.LayoutParams param = new RelativeLayout.LayoutParams(480,80);

param.leftMargin = 0;

param.topMargin = 0;

addContentView(adView,param);


But result is not what I expect. The Admob view was clipped. Just part of 
Admob was show. It seem that AdMob view has a clip area, when I rotate the 
AdMob view, the clip area is not rotated. So most Admob view is clipped, 
just overlap area between the clip area and actually view was shown. 

If I don't apply the rotate animation, the AdMob view is shown as portrait 
mode as normal.


Is someone can give me some advise to avoid this? Thanks a lot.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to