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 -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

java - How to implement an entity bound odata action in olingo v4.3 -