protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            button = FindViewById <Button>(Resource.Id.MyButton);

            button.Click += Button_Click;


            //setup ads

            /* var moPubViewBanner = FindViewById<MoPubView>(Resource.Id.adview_banner);
             * moPubViewBanner.Testing = true;
             * moPubViewBanner.AdUnitId = Resources.GetString(Resource.String.mopub_ad_id_banner);
             * moPubViewBanner.LoadAd();*/
            mInterstitial = new MoPubInterstitial(this, "21e005af2366472782920bbf705d7635");
            mInterstitial.Load();
        }
Пример #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            button = FindViewById <Button>(Resource.Id.MyButton);

            BannerButton        = FindViewById <Button>(Resource.Id.banner);
            button.Click       += Button_Click;
            BannerButton.Click += BannerButton_Click;

            //setup ads

            moPubViewBanner          = FindViewById <MoPubView>(Resource.Id.adview_banner);
            moPubViewBanner.Testing  = true;
            moPubViewBanner.AdUnitId = Resources.GetString(Resource.String.mopub_ad_id_banner);

            mInterstitial = new MoPubInterstitial(this, "09a914c0486044f3936c85cbbf1bd766");
            mInterstitial.Load();
        }