How to add a banner adview to the layout?

16 Views Asked by At

I'm pretty sure that Google used to publish an XML snippet of how to add a banner AdView to the layout, a ConstraintLayout to be precise. But that isn't in the documentation anymore.

There is a section called Add AdView to the layout and it contains a code snipped with some weird screen size calculations without any explanations of why I have to do this. I haven't seen this before. Is this supposed to integrate with Compose somehow? If so, how?

However, I'm on a good old XML layout. How to integrate an AdView in an XML layout in 2024?

0

There are 0 best solutions below