Google admob SMART_BANNER position

Google admob SMART_BANNER position
0.0 0

#1

Hi

I attached admob as BANNER, but it is to small in tablet so i changed it’s size to SMART_BANNER.

but banner’s position is not in bottom, but little above from bottom.

this is my android-studio banner create code.

            mAdView = new AdView(_appActivity);
            mAdView.setAdSize(AdSize.SMART_BANNER);
            mAdView.setAdUnitId(_appActivity.getResources().getString(R.string.ad_banner));

            mAdView.loadAd(adRequest);
            /*
            LinearLayout linearLayout = new LinearLayout( _appActivity );

            LinearLayout.LayoutParams adParams = new LinearLayout.LayoutParams(
                    LinearLayout.LayoutParams.MATCH_PARENT,
                    LinearLayout.LayoutParams.WRAP_CONTENT);
            adParams.gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL;
            linearLayout.addView( mAdView, adParams );
            _appActivity.mFrameLayout.addView( linearLayout );
            */
            RelativeLayout relativeLayout = new RelativeLayout(_appActivity);
            relativeLayout.setY(0);
            _appActivity.mFrameLayout.addView(relativeLayout);


            RelativeLayout.LayoutParams adViewParams = new RelativeLayout.LayoutParams(
                    AdView.LayoutParams.WRAP_CONTENT,
                    AdView.LayoutParams.WRAP_CONTENT);
            // align bottom
            adViewParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, RelativeLayout.TRUE);
            // align center
            adViewParams.addRule(RelativeLayout.CENTER_IN_PARENT, RelativeLayout.TRUE);


            relativeLayout.addView(mAdView, adViewParams);

            mAdView.setBackgroundColor(Color.BLACK);

            mAdView.setBackgroundColor(0);

How do i change the code? thanks.