title: AdMob banner in fragments
body: <p>so I have made an app and now Im putting ad banners here. I followed this tutorial <a href="https://firebase.google.com/docs/admob/android/quick-start" rel="nofollow noreferrer">https://firebase.google.com/docs/admob/android/quick-start</a> and everything works fine but I want to put banners to my fragments too. I was looking here on website and I found this to put to fragment </p>
  
  <pre><code>    MobileAds.initialize(getApplicationContext(), "ca-app-pub-xxxxxxxxxxxxxxxx~xxxxxxxx");
  
      AdView mAdView = (AdView)findViewById(R.id.adView);
      AdRequest adRequest = new AdRequest.Builder().build();
      mAdView.loadAd(adRequest);
  </code></pre>
  
  <p>but when i click on fragment afterwards the app stop working</p>
  
  <p>Im total beginner in this.</p>