Skip to content

Commit

Permalink
Fix #34
Browse files Browse the repository at this point in the history
  • Loading branch information
AGulev committed Mar 12, 2024
1 parent 7d32f12 commit 8f688ec
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.content.Context;
import android.graphics.PixelFormat;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewGroup.MarginLayoutParams;
import android.view.WindowManager;
Expand Down Expand Up @@ -316,7 +317,9 @@ public void loadBanner(String placementId, int width, int height) {
@Override
public void onBannerLoaded(BannerView bannerAdView) {
bannerView = bannerAdView;

if(bannerView.getParent() != null) {
((ViewGroup)bannerView.getParent()).removeView(bannerView);
}
layout = new LinearLayout(activity);
layout.setOrientation(LinearLayout.VERTICAL);
layout.setSystemUiVisibility(activity.getWindow().getDecorView().getSystemUiVisibility());
Expand Down

0 comments on commit 8f688ec

Please sign in to comment.