i want to rotate the AdWhirl Banner -90 degrees. The Banner-view should therefore viewed vertical on the left side.
My first idea was to override the onDraw Methode and put in there the logic to rotate, but I didnt found any possibility to override any drawing functionality in adwhirl.
However, i rotated the "com.adwhirl.AdWhirlLayout" with an Animator as follows:
<com.adwhirl.AdWhirlLayout
android:id="@+id/adwhirl_layout"
android:layout_width="300dp"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:animationCache="false"
android:layout_height="53dp" />
The Rotator XML:
<?xml version="1.0" encoding="utf-8"?>
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="-90"
android:pivotX="10%"
android:pivotY="50%"
android:duration="0"
android:fillEnabled="false"
android:fillAfter="true"/>
Java:
AdWhirlLayout mAdWhirlLayout = (AdWhirlLayout) findViewById(R.id.adwhirl_layout);
Animation animation = AnimationUtils.loadAnimation(this, R.animator.rotate);
mAdWhirlLayout.setAdWhirlInterface(new CustomEvents(mAdWhirlLayout, this, getApplicationContext()));
mAdWhirlLayout.startAnimation(animation);
The Problem is, that the first displayed banner looks sometimes good (correct rotated). Following, refreshed banners are only displayed a small piece of it (~25% width of the total graphic). I tried different things, but nothing works well.
Is there any better way to rotate the AdWhirl Banner correctly? Thanks!