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
Post a Comment