文档说我应该在我的代码中添加这样的东西:
// create a new layout
LinearLayout layout = new LinearLayout(this);
/*
Add any elements to your view
*/
// make the view visible
this.setContentView(layout);
final Activity act = this;
// now add the banner or overlay to the app
layout.post(new Runnable() { //what about this line?
public void run() {
myController = new AdController(act, MY_LB_SECTION_ID);
myController.loadAd();
}
});
我的布局是在 xml 中,我已经定义setContentView(R.layout.config);
了我的意思是layout.post(new Runnable() { line
. 我应该如何修改代码?