0

hello how to show mopub ad at the bottom?

I have this code

RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(
                RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
        params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
        mopView = new MoPubView(this);
            mopView.setAdUnitId(PUB_ID_320x50);
            mopView.setLayoutParams(params);
            mopView.loadAd();
            mainRelative.addView(mopView, params);

but it show in center of screen , how to align to bottom? p.s. my main layout is RelativeLayout

4

1 に答える 1

0

//change your layout height to ill parent

 RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM,RelativeLayout.TRUE);
于 2012-07-25T10:09:22.890 に答える