Example #1
0
 @Override
 public void onDismissScreen() {
   Log.d("PunchBoxAd", "AdHandler.onDismissScreen");
   if (adType.compareToIgnoreCase("banner") != 0) {
     remove();
     listener.onDismissScreen();
   }
 }
Example #2
0
 private void removeBannerAd() {
   if (bannerAd != null) {
     bannerAd.setAdListener(null);
     ViewGroup bannerAdParent = (ViewGroup) bannerAd.getParent();
     ViewGroup group = (ViewGroup) bannerAdParent.getParent();
     group.removeView(bannerAdParent);
     bannerAd = null;
     listener.onDismissScreen();
   }
 }