修改%project_name%.java
1、屏蔽
/* linearLayout.LayoutParams adParams = new linearLayout.LayoutParams(
wIDth,
linearLayout.LayoutParams.WRAP_CONTENT);
*/
屏蔽
// addContentVIEw(adVIEw,adParams);
2、添加在。。。之后
adVIEw = new AdVIEw(this);
adVIEw.setAdSize(AdSize.BANNER);
adVIEw.setAdUnitID(AD_UNIT_ID);
relativeLayout relativeLayout=new relativeLayout(this); Cocos2dxActivity.mFrameLayout.addVIEw(relativeLayout); relativeLayout.LayoutParams adVIEwParams = new relativeLayout.LayoutParams( wIDth,AdVIEw.LayoutParams.WRAP_CONTENT); //important adVIEwParams.addRule(relativeLayout.AliGN_PARENT_BottOM); relativeLayout.addVIEw(adVIEw,adVIEwParams);总结
以上是内存溢出为你收集整理的Cocos2d-x 2.x android下集成admob广告(二)底部banner全部内容,希望文章能够帮你解决Cocos2d-x 2.x android下集成admob广告(二)底部banner所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)