android - How do I display admob ads across activities -


i able ad ads apps main activity. can not figure out how make display across 3 activities have in app.

    import com.google.ads.*;        public class testactivity extends activity {              private static final string my_ad_unit_id = "yourid";              private adview adview;           @override          public void oncreate(bundle savedinstancestate) {              super.oncreate(savedinstancestate);              super.loadurl("file:///android_asset/www/index.html");                    // create adview                      adview = new adview(this, adsize.banner, my_ad_unit_id);                      linearlayout layout = super.root; // change                      layout.addview(adview);                      adview.loadad(new adrequest());      xml file:         <com.admob.android.ads.adview               android:id="@+id/ad"               android:layout_width="fill_parent"               android:layout_height="wrap_content"               xmlns:backgroundcolor="#000000"               xmlns:primarytextcolor="#ffffff"               xmlns:secondarytextcolor="#cccccc" 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -