I wanted to put an ad banner inside AlertDialog
, can you do that?
I wanted to put an ad banner inside AlertDialog
, can you do that?
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 .