X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Ffree%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2FBannerAd.java;fp=app%2Fsrc%2Ffree%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2FBannerAd.java;h=88e3985ba8c771e2a54008e47dbe4e55ac80bd0c;hb=7f8620e81518589f44c8517edbfc8989a5f04845;hp=3f9d9a7358355686163385f42a6db61915fb9774;hpb=1de1331606f26046a683449d978ef6d7e1cdc3a6;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..88e3985b 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