Display native ad on Android
Step 1: Layout the native ad in xml
The types of views that can be configured in a native ad are as follows:
Icon
Advertiser
Headline
Body
Media
Call to action
For example, when configuring a social feed ad, you can lay it out as follows:
AdropNativeAdView - parent view
β Icon (ImageView)
β Advertiser (TextView)
β Media (AdropMediaView)
β Body (TextView)
Step 2: Load a native ad
Step 3: Connect a native ad to view
Here is an example that creates a AdropNativeAdView and populates it with a AdropNativeAd:
Destroy
When you are done showing your AdropNativeAd, you should destroy it so that the ad is properly garbage collected.
Last updated