Reputation: 21647
I use millenial ads in my application. I've set android:layout_width="320dp" and I've tried using and android:layout_width="fill_parent", but it seems that almost every time the ad's width is larger than screen width and a horizontal scrollbar appear. Do you know how to fix this? I want my ad to have the exact size I've set in xml file. Thans
Upvotes: 0
Views: 869
Reputation: 13620
Page 7 from README.PDF (from MM SDK)
XML Layout
In your layout file, declare the Millennial Media namespace: xmlns:app="http://millennialmedia.com/android/schema" Then add the MMAdView and associated meta data you wish to include.
<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" />
You see? app:width="480"
MM has 5 different ad types: 1. Launch Prestitial 2. Transition Interstitial 3. Top of Page 4. Below the Fold 5. Rectangle
I guess you are interested in nr. 3 and 4. These are located either at the top or at the bottom of the screen and they meant to fill the width in portrait mode. I guess ads from MM have a fixed width so you need to adjust the width of your view. Although, I haven't tried it perhaps playing around with the value of "app:width" may help you.
I have also a Desire and I'm using AdWhirl. First I enabled AdMob with it and then added MM as a 2. network. I also had to adjust the maxWidth/maxHeight of my view because MM ads are quite larger than AdMob ads.
Upvotes: 1