I am trying to customize my own ads from Admob programmatically, but there is almost no documentation on this from the official guide available here . I think I'm close to a solution, but I donβt see how to set its size.
The documentation says:
Publishers can also use the FULL_WIDTH constant when creating AdSize programmatically for NativeExpressAdView.
The problem is that this FULL_WIDTH block FULL_WIDTH not an AdSize module, like the others available, it just returns an integer.
Here is what I got now:
mAdmobNativeExpressAdview = new NativeExpressAdView(this); mAdmobNativeExpressAdview.setAdUnitId(getString(R.string.mediation_native_id)); mAdmobNativeExpressAdview.setAdSize(AdSize.FULL_WIDTH);
But the last line cannot be implemented, as setAdSize expects an AdSize object.
Is there any other way to set this attribute?
android admob native-ads
Yoann hercouet
source share