I followed all Native Express Adview questions since 2 weeks but never found a correct answer for me and I hope I can help you (Or anyone that read it) with my own solution.
I use this on my Fragment Adapter.
contadorAnuncio=position; // position is the number of item assigned on listview
if (contadorAnuncio > 0 && contadorAnuncio % 9 == 0)
{
Log.i("Inicio en 10", "inicio anuncio");
convertView.findViewById(R.id.adView).setVisibility(View.VISIBLE);
NativeExpressAdView adView = (NativeExpressAdView) convertView.findViewById(R.id.adView);
adView.loadAd(new AdRequest.Builder().build());
adView.setTag(position);
}else{
convertView.findViewById(R.id.adView).setVisibility(View.GONE);
}
return convertView;
}
And this before ending my xml.
Don't forget to add:
android:visibility="gone" and xmlns:ads="http://schemas.android.com/apk/res-auto"
and change adSize.
<com.google.android.gms.ads.NativeExpressAdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="@string/native_express_ad_unit_id"
ads:adSize="FULL_WIDTHx400"
android:visibility="gone">
</com.google.android.gms.ads.NativeExpressAdView>
Check how integrated are ads with Native Express Adview.
Native Express Adview on my App