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 i
dragonfly's answer worked for me. Here is the complete code snippet for the reference
adView = new AdView(this, AdSize.BANNER, "xxxxxxxxxxxxxxx");
panel = new MySurfaceView(this);
AdRequest adRequest = new AdRequest();
adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
RelativeLayout rl = new RelativeLayout(this);
RelativeLayout.LayoutParams lay = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
lay.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
rl.addView(panel);
rl.addView(adView, lay);
setContentView(rl);
adView.loadAd(adRequest);