X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;ds=sidebyside;f=app%2Fsrc%2Ffree%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2FBannerAd.java;h=c9263c27dec9ebe5205a829976bae38a4dacc607;hb=897b2d7f61a0492f228e3c172d7c6a76e3c5f3ac;hp=3f9d9a7358355686163385f42a6db61915fb9774;hpb=ae2ee09aa7a2afc19f5603c9bc021f98888d7b78;p=PrivacyBrowserAndroid.git diff --git a/app/src/free/java/com/stoutner/privacybrowser/BannerAd.java b/app/src/free/java/com/stoutner/privacybrowser/BannerAd.java index 3f9d9a73..c9263c27 100644 --- a/app/src/free/java/com/stoutner/privacybrowser/BannerAd.java +++ b/app/src/free/java/com/stoutner/privacybrowser/BannerAd.java @@ -1,5 +1,5 @@ -/** - * Copyright 2016 Soren Stoutner . +/* + * Copyright © 2016-2017 Soren Stoutner . * * This file is part of Privacy Browser . * @@ -39,24 +39,24 @@ public class BannerAd extends AppCompatActivity{ } public static void reloadAfterRotate (View view, Context applicationContext, String ad_id) { - // Cast view to an AdView. + // Cast `view` to an `AdView`. AdView adView = (AdView) view; // Save the layout parameters. RelativeLayout.LayoutParams adViewLayoutParameters = (RelativeLayout.LayoutParams) adView.getLayoutParams(); - // Remove the AdView. + // Remove the `AdView`. RelativeLayout adViewParentLayout = (RelativeLayout) adView.getParent(); adViewParentLayout.removeView(adView); - // Setup the new AdView. + // Setup the new `AdView`. adView = new AdView(applicationContext); adView.setAdSize(AdSize.SMART_BANNER); adView.setAdUnitId(ad_id); - adView.setId(R.id.adView); + adView.setId(R.id.adview); adView.setLayoutParams(adViewLayoutParameters); - // Display the new AdView. + // Display the new `AdView`. adViewParentLayout.addView(adView); // Request a new ad. @@ -65,7 +65,7 @@ public class BannerAd extends AppCompatActivity{ } public static void hideAd(View view) { - // Cast view to an AdView. + // Cast `view` to an `AdView`. AdView adView = (AdView) view; // Hide the ad. @@ -73,26 +73,26 @@ public class BannerAd extends AppCompatActivity{ } public static void showAd(View view) { - // Cast view to an AdView. + // Cast `view` to an `AdView`. AdView adView = (AdView) view; - // Hide the ad. + // Show the ad. adView.setVisibility(View.VISIBLE); } public static void pauseAd(View view) { - // Cast view to an AdView. + // Cast `view` to an `AdView`. AdView adView = (AdView) view; - // Pause the AdView. + // Pause the `AdView`. adView.pause(); } public static void resumeAd(View view) { - // Cast view to an AdView. + // Cast `view` to an `AdView`. AdView adView = (AdView) view; - // Resume the AdView. + // Resume the `AdView`. adView.resume(); } } \ No newline at end of file