将Admob横幅添加到屏幕

时间:2014-08-18 12:50:32

标签: android admob banner banner-ads

不能像往常一样添加admob横幅:

  // Create an ad.
    adView = new AdView(this, AdSize.BANNER, "*********************");
    RelativeLayout layout = (RelativeLayout) findViewById(R.id.rel2);
    layout.addView(adView);
    AdRequest adRequest = new AdRequest();
    adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
    adView.loadAd(adRequest); 

但现在我正在使用:

public class MainMenuScreen extends Screen {

    private AdView adView;
    public MainMenuScreen(Game game) {

        super(game);    
    }   
----------------------------
public class AndroidFastRenderView extends SurfaceView implements Runnable {
    AndroidGame game;
    Bitmap framebuffer;
    .......

那么我如何在新游戏应用中使用Admob横幅? 如果您想查看其他代码,请给我打电话)

0 个答案:

没有答案