use of com.google.ads.AdView in project TextureViewDemo by dalinaum.
the class GLTriangleActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.content);
ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
final AdView adView = new AdView(this, AdSize.SMART_BANNER, "a1513f5a0d88abc");
final FrameLayout adContainer = (FrameLayout) findViewById(R.id.adContainer);
adContainer.addView(adView);
AdRequest adRequest = new AdRequest();
// adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
adView.loadAd(adRequest);
mVertices = ByteBuffer.allocateDirect(mVerticesData.length * 4).order(ByteOrder.nativeOrder()).asFloatBuffer();
mVertices.put(mVerticesData).position(0);
mTextureView = (TextureView) findViewById(R.id.texture_view);
mTextureView.setSurfaceTextureListener(new GLSurfaceTextureListener());
}
Aggregations