Android : How to display Ad only using Java and not xml -


is possible generate ad banner using java coding in android eclipse, without using xml <com.google.....> tags?

you can create object of adview , add frame layout like,

adview madview = new adview(context); madview.setadsize(adsize.banner); madview.setadunitid(ad_unit_id); framelayout framelayout = (framelayout) view.findviewbyid(r.id.adview); framelayout.addview(madview); adrequest adrequest = new adrequest.builder().build(); madview.loadad(adrequest); 

hope help!


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -