Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9030d0c

Browse files
runnerrunner
authored andcommittedSep 28, 2023
Release 4.9.0
1 parent 4f6c0f6 commit 9030d0c

File tree

183 files changed

+2793
-2330
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+2793
-2330
lines changed
 

‎app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "com.unity3d.ads.example"
88
minSdkVersion 19
99
targetSdkVersion 33
10-
versionCode = 4800
11-
versionName = "4.8.0"
10+
versionCode = 4900
11+
versionName = "4.9.0"
1212
}
1313

1414
buildTypes {

‎app/src/main/java/com/unity3d/ads/example/ui/main/UnityAdsFragment.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818
import android.widget.RelativeLayout;
1919
import android.widget.Toast;
2020

21-
import com.unity3d.ads.IUnityAdsInitializationListener;
22-
import com.unity3d.ads.IUnityAdsLoadListener;
23-
import com.unity3d.ads.IUnityAdsShowListener;
24-
import com.unity3d.ads.UnityAds;
25-
import com.unity3d.ads.UnityAdsShowOptions;
21+
import com.unity3d.ads.*;
2622
import com.unity3d.ads.example.R;
2723
import com.unity3d.ads.metadata.MediationMetaData;
2824
import com.unity3d.ads.metadata.MetaData;
@@ -68,6 +64,7 @@ public void onBannerShown(BannerView bannerAdView) {
6864
@Override
6965
public void onBannerFailedToLoad(BannerView bannerAdView, BannerErrorInfo errorInfo) {
7066
Log.e(LOGTAG, "Unity Ads failed to load banner for " + bannerAdView.getPlacementId() + " with error: [" + errorInfo.errorCode + "] " + errorInfo.errorMessage);
67+
enableButton(showBannerButton);
7168
}
7269

7370
@Override
@@ -203,6 +200,7 @@ public void onClick(View v) {
203200
this.showBannerButton.setOnClickListener(new View.OnClickListener() {
204201
@Override
205202
public void onClick(View v) {
203+
disableButton(showBannerButton);
206204
bottomBanner = new BannerView((Activity)v.getContext(), "bannerads", new UnityBannerSize(320, 50));
207205
bottomBanner.setListener(bannerListener);
208206
bottomBanner.load();
@@ -213,11 +211,12 @@ public void onClick(View v) {
213211
hideBannerButton.setOnClickListener(new View.OnClickListener() {
214212
@Override
215213
public void onClick(View v) {
216-
bottomBanner.removeAllViews();
217214
if (bottomBanner != null) {
215+
bottomBanner.removeAllViews();
218216
bottomBanner = null;
219217
}
220-
showBannerButton.setEnabled(true);
218+
enableButton(showBannerButton);
219+
disableButton(hideBannerButton);
221220
}
222221
});
223222

0 commit comments

Comments
 (0)
Please sign in to comment.