customViewForRendering

abstract fun customViewForRendering(container: ViewGroup, nativeAd: NativeAd): View

Override this method to provide a custom layout for a Facebook NativeAd.

The View returned from this method should have all of the data set from the native ad on children views such as the call to action, image data, title, privacy icon etc. The view returned from this method should not be attached to the container passed in as it will be attached at a later time during the rendering process.

Return

An custom ad layout that will be attached to the container

Parameters

container

the container the layout will be attached to

nativeAd

the Facebook native ad with the relevant ad information