I have some problem with ads showing in Adwhirl.
I'm showing Millenial Media and Admob ads there.
Admob is looking pretty good but when MM ad is loaded it looks that the ad is too long.
I was trying to fix it in some ways but couldn't repair it.
Here is my Java code for Adwhirl:
LinearLayout layout = (LinearLayout) findViewById(R.id.layout_main);
AdWhirlLayout adWhirlLayout = new AdWhirlLayout(this, "apid");
RelativeLayout.LayoutParams adWhirlLayoutParams =
new RelativeLayout.LayoutParams(
LayoutParams.FILL_PARENT,
LayoutParams.WRAP_CONTENT);
int diWidth = 320;
int diHeight = 53;
float density = getResources().getDisplayMetrics().density;
adWhirlLayout.setMaxWidth((int)(diWidth * density + 0.5f));
adWhirlLayout.setMaxHeight((int)(diHeight * density + 0.5f));
layout.addView(adWhirlLayout, adWhirlLayoutParams);
layout.invalidate();
If someone know how to fix it please help.
EDIT:
I'm working on HTC Desire and also tried to create adwhirl layout in xml and still same issue ;(
I tried to add MM Layout to xml and with parameter app:width="320" it looks good. Default it is 480 and with this value the ad looks similar to adwhirl implementaion (too long)
xmlns:app="http://millennialmedia.com/android/schema"
<com.millennialmedia.android.MMAdView
android:id="@+id/mmadview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
app:apid="28911"
app:adType="MMBannerAdTop"
app:refreshInterval="30"
app:accelerate="true"
app:ignoreDensityScaling="false"
app:age="46"
app:gender="female"
app:zip="90210"
app:income="85000"
app:keywords="moms,shopping,groceries"
app:ethnicity="hispanic"
app:orientation="straight"
app:marital="married"
app:children="2"
app:education="college"
app:politics="libertarian"
app:height="60"
app:width="480" /> <------------------------------------HERE
Maybe there is some possibility to set this value in adwhirl layout?
EDIT 2:
It looks that there is problem with 480x800 devices resolution. I debuged app on QVGA 320x240 emulator and ad looks pretty nice.
EDIT 3:
It looks like on image in link: Too long MM ad in Adwhirl Layout
When ad appears i can see horizontal scrollbar and i think that I can see only 2/3 of these ads