React-native-admob: [Question] is it possible to render ads in a flatlist ?

Created on 5 Sep 2019  路  7Comments  路  Source: sbugert/react-native-admob

My app has a feed view and i need to serve ads there is it possible to render ads there using this library ? if so please tell me how because i didn't find anything.

Most helpful comment

You can keep ads in flatlist using renderItem() function, keep your logic in that function to display the Ads.

All 7 comments

Hi yes it is

you can actually use ItemSeparatorComponent to place an ad between each item on a colum flat list if you dont want one being placed after every item simply implament a function that counts how many items are in the list and place the ad every 5 or so items

if you are using a row its the same kind of thing the issue when you are going to have errors with is when you use a grid layout or if you load to many ads into the list it will slow things down a lot

you can actually use ItemSeparatorComponent to place an ad between each item on a colum flat list

Hi, Thank you for your response, one more question, what type of ad should i use ? because native ads are not supported yet.

banner ads are the best if your using a vertical list if your using a horizontal list then you want a small banner or rectangle

You can keep ads in flatlist using renderItem() function, keep your logic in that function to display the Ads.

@ursNj according to admob docs they don't recommend placing banner ads in scrolling area. Also banner ads should not imitate your content and should be placed distinctly seperate from apps interactive area. So won't your solution go against these guidelines and result in suspension from admob ?

@vinaynb-at , to be frank im not aware of this policy, but i have placed ads in flatlist its working fine and i didnt faced any issue. also i saw in many apps placed ads in scrolling area, dont worry about this policy, have fun.

Hi yes it is

you can actually use ItemSeparatorComponent to place an ad between each item on a colum flat list if you dont want one being placed after every item simply implament a function that counts how many items are in the list and place the ad every 5 or so items

if you are using a row its the same kind of thing the issue when you are going to have errors with is when you use a grid layout or if you load to many ads into the list it will slow things down a lot

@Rob2k9 can you show me how show ItemSeparatorComponent after every tenth element?

I have numColums={2}

can you help me?

I really do not understand how do this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ozmaat picture ozmaat  路  3Comments

talaikis picture talaikis  路  3Comments

shinriyo picture shinriyo  路  3Comments

kanekotic picture kanekotic  路  6Comments

thekiwi picture thekiwi  路  4Comments