Want more features on Pastebin? Sign Up, it's FREE!
Guest

codesss

By: a guest on Jul 22nd, 2013  |  syntax: Java  |  size: 1.01 KB  |  views: 41  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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);
clone this paste RAW Paste Data