How do I place an advert within AlertDialog? [closed]

0

I wanted to put an ad banner inside AlertDialog , can you do that?

    
asked by anonymous 20.06.2017 / 22:57

1 answer

0

First you need to create a custom AlertDialog (en) . Soon after you enter the AdView referencing the dialog to findViewByID . See below:

AdView adView = (AdView)dialog.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);

See more detail regarding AdMob , read here at documentation .

    
21.06.2017 / 01:55