From ba988d6fde65e494161324230caf147152ffdc7c Mon Sep 17 00:00:00 2001 From: p32929 Date: Sat, 2 Jan 2021 22:31:23 +0600 Subject: [PATCH] fixed minor issues --- README.md | 2 +- .../main/java/p32929/myhouseads2lib/HouseAds.java | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4c3c5b9..f89416e 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Add the dependency ``` dependencies { - implementation 'com.github.p32929:HouseAds2:1.0.0.15' + implementation 'com.github.p32929:HouseAds2:1.0.0.16' } ``` diff --git a/myhouseads2lib/src/main/java/p32929/myhouseads2lib/HouseAds.java b/myhouseads2lib/src/main/java/p32929/myhouseads2lib/HouseAds.java index 971e999..38d65b0 100644 --- a/myhouseads2lib/src/main/java/p32929/myhouseads2lib/HouseAds.java +++ b/myhouseads2lib/src/main/java/p32929/myhouseads2lib/HouseAds.java @@ -94,11 +94,15 @@ public void doSomethingAfter(double seconds, Runnable runnable) { } private void putBannerAds() { - currentAdView = new MyAdView(context, adArrayList.get(bannerCount)); - if (linearLayout != null) - linearLayout.addView(currentAdView); + try { + currentAdView = new MyAdView(context, adArrayList.get(bannerCount)); + if (linearLayout != null) + linearLayout.addView(currentAdView); - incrementAndSaveCounter(); + incrementAndSaveCounter(); + } catch (Exception e) { + // + } } public void putBannerAds(LinearLayout linearLayoutAds) {