diff --git a/java/advanced/BannerRecyclerViewExample/app/src/main/java/com/google/android/gms/example/bannerrecyclerviewexample/MainActivity.java b/java/advanced/BannerRecyclerViewExample/app/src/main/java/com/google/android/gms/example/bannerrecyclerviewexample/MainActivity.java index e6a642922..462298f00 100644 --- a/java/advanced/BannerRecyclerViewExample/app/src/main/java/com/google/android/gms/example/bannerrecyclerviewexample/MainActivity.java +++ b/java/advanced/BannerRecyclerViewExample/app/src/main/java/com/google/android/gms/example/bannerrecyclerviewexample/MainActivity.java @@ -149,6 +149,7 @@ private void loadBannerAd(final int index) { @Override public void onAdLoaded() { super.onAdLoaded(); + adView.setAdListener(null); // The previous banner ad loaded successfully, call this method again to // load the next ad in the items list. loadBannerAd(index + ITEMS_PER_AD); @@ -156,6 +157,7 @@ public void onAdLoaded() { @Override public void onAdFailedToLoad(int errorCode) { + adView.setAdListener(null); // The previous banner ad failed to load. Call this method again to load // the next ad in the items list. Log.e("MainActivity", "The previous banner ad failed to load. Attempting to"