Runnable SurfaceView上的Admob

时间:2013-10-24 21:05:06

标签: android android-layout admob surfaceview runnable

如何在以下代码中创建我的admob横幅?我完成了一个甜蜜的游戏,但现在我被困在广告的东西:(。admob的官方说明不是在谈论 SurfaceView

public class MainActivity extends Activity implements OnTouchListener {      
FastRenderView ren;

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                         WindowManager.LayoutParams.FLAG_FULLSCREEN);
    try {
        ren = new FastRenderView(this);
    } catch (IOException e) {
        e.printStackTrace();
    }
    ren.setOnTouchListener(this);
    setContentView(ren);       

class FastRenderView extends SurfaceView implements Runnable {
    Thread renderThread = null;
    SurfaceHolder holder;
...

0 个答案:

没有答案