Guest User

Untitled

a guest
Jun 16th, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. admob: How to load AdRequest outside of UI Thread?
  2. super.onCreate(savedInstanceState){
  3.  
  4. mainLayout = new LinearLayout(this);
  5. mainLayout.setOrientation(LinearLayout.VERTICAL);
  6. adView = new AdView(this, AdSize.BANNER, "MY_ID");
  7. adView.setVisibility(AdView.VISIBLE);
  8. mainLayout.addView(adView);
  9. adView.loadAd(new AdRequest());
  10. //more codes below
  11. }
Advertisement
Add Comment
Please, Sign In to add comment