Advertisement
Guest User

codesss

a guest
Jul 22nd, 2013
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.01 KB | None | 0 0
  1. this.mRenderSurfaceView = new RenderSurfaceView(this);
  2.  
  3.    this.mRenderSurfaceView.setRenderer(this.mEngine,this);
  4.    final android.widget.FrameLayout.LayoutParams surfaceViewLayoutParams = new FrameLayout.LayoutParams(super.createSurfaceViewLayoutParams());
  5.  
  6.    //Creating the banner view.
  7.    AdView adView = new AdView(this, AdSize.BANNER, "MY_ID_HERE");
  8.    adView.loadAd(new AdRequest());
  9.   final FrameLayout.LayoutParams adViewLayoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT, Gravity.CENTER | Gravity.CENTER_HORIZONTAL);
  10.  
  11.  
  12.    final FrameLayout frameLayout = new FrameLayout(this);
  13.  
  14.    final FrameLayout.LayoutParams frameLayoutLayoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.FILL_PARENT, FrameLayout.LayoutParams.FILL_PARENT);
  15.  
  16.  
  17.    frameLayout.addView(this.mRenderSurfaceView,surfaceViewLayoutParams);
  18.    frameLayout.addView(adView,adViewLayoutParams);
  19.  
  20.    this.setContentView(frameLayout, frameLayoutLayoutParams);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement