using System;
using System.Collections.Generic;
using Xamarin.Forms;
using XamarinDemoApp.SDKMobileSpots;

namespace XamarinDemoApp.Views
{
    public partial class MobileSpotsPage : ContentPage
    {
        InterstitialAdView interstitialAdView;

        public MobileSpotsPage()
        {
            InitializeComponent();
        }

        private void InterstitialAd_Clicked(Object sender, EventArgs args)
        {
            if (interstitialAdView != null && ContainerLayout.Children.Contains(interstitialAdView))
            {
                ContainerLayout.Children.Remove(interstitialAdView);
            }
            interstitialAdView = new InterstitialAdView();
            interstitialAdView.SpotId = "wei_wen_spot4";
            ContainerLayout.Children.Add(interstitialAdView);
        }
    }
}

