I'm trying to set AdMob banner ad to match it's parent width.
I tried as sample:
<com.google.ads.AdView
android:id="@+id/ad"
android:layout_width="match_parent"
android:layout_height="50dp"
android:gravity="center"
ads:adSize="BANNER"
ads:adUnitId="app-pub-id"
ads:loadAdOnCreate="true"/>
And got:
I also tried with:
ads:adSize="SMART_BANNER"
In the IDE xml preview, I got:
But in fact the ad didn't match his parent width.
Anyone?