title: Android View align bottom (programmatically) without XML
body: <p>I got a problem with setting aligning my view programatically to the bottom of the screen. Basically I just want to place my admob advert at the screen bottom. I can't do it with XML because it would be even more troublesome. Right now I already got the advert working, and added it manually to the <code>RelativeLayout</code>, but by default it appears at the top of the screen. I tried to use the gravity command, but couldn't get it working.</p>
  
  <p>Here's the code snippet:</p>
  
  <pre><code>    _glSurfaceView = new CCGLSurfaceView(this);
  
      adView = new AdView(this, AdSize.BANNER, "a14e04559caea39");
      adView.loadAd(new AdRequest());
      adView.setGravity(Gravity.BOTTOM);
  
      RelativeLayout rl = new RelativeLayout(this);
  
      rl.addView(_glSurfaceView);
      rl.addView(adView);     
  
      setContentView(rl);
      adView.loadAd(new AdRequest());
  </code></pre>
  
  <p>Can anyone help me out?</p>