title: Android change google map padding at runtime
body: <p>I want to move Google map layout items at runtime, but I'm not able to do it and I don't know if it's possible or not.
  What I want to do is: I have a Google map fragment which takes up all the screen. I also have an Ad. When app starts, I show the map. Like this:</p>
  
  <p><img src="https://i.stack.imgur.com/a0jfJ.jpg" alt="enter image description here"></p>
  
  <p>And when the ad loads, I show the ad at the bottom, but I need to move the Google logo above the ad. Like this:</p>
  
  <p><img src="https://i.stack.imgur.com/7xK2G.jpg" alt="enter image description here"></p>
  
  <p>I've tried with:</p>
  
  <pre><code>if (banner is loaded)
  googleMap.setPadding(0, 0, 0, banner.getLayoutParams().height);
  </code></pre>
  
  <p>But I had no success. What am I doing wrong?</p>
  
  <p><strong><em>EDIT:</em></strong> Thanks to @SimplePlan, I changed the RelativeLayout where was included the mapfragment to a FrameLayout:</p>
  
  <pre><code>&lt;FrameLayout &gt;
      &lt;fragment
          android:id="@+id/map"
          class="com.google.android.gms.maps.SupportMapFragment" /&gt;
  
      &lt;com.inmobi.monetization.IMBanner
          android:layout_gravity="bottom" /&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>And I added a listener to the Ad:</p>
  
  <pre><code>banner.setIMBannerListener(new IMBannerListener() {
      @Override
      public void onBannerRequestSucceeded(IMBanner arg0) {
          googleMap.setPadding(0, 0, 0, banner.getLayoutParams().height);
      }
  });
  </code></pre>