How to place ad inside Alertdialog?

Asked

Viewed 38 times

0

I wanted to put an ad banner inside the AlertDialog , has how to do this?

1 answer

0


First you need to create a Personalized alertdialog. Soon after you insert the AdView referencing the dialog at the 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.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.