9. Adding a
com.google.android.gms.ads.AdView
Android apps are composed of View objects, which are Java instances the user sees as
text areas, buttons and other controls. AdView is simply another View subclass displaying
small HTML5 ads that respond to user touch.
Like any View, an AdView may be created either purely in code or largely in XML.
The five lines of code it takes to add a banner:
1. Import com.google.android.gms.ads.*
2. Declare an AdView instance
3. Create it, specifying the ad unit ID
4. Add the view to the UI
5. Load it with an ad
The easiest place to do all this is in your app's Activity.