Created
December 19, 2011 23:22
-
-
Save keijiro/1499391 to your computer and use it in GitHub Desktop.
AdMob installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void installAdBannerInternal() { | |
// レイアウトをでっち上げる。 | |
RelativeLayout layout = new RelativeLayout(this); | |
addContentView(layout, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); | |
layout.setGravity(Gravity.BOTTOM); | |
// バナー広告を配置。 | |
adBanner = new AdView(this, AdSize.BANNER, adPublisher); | |
layout.addView(adBanner); | |
// 広告をリクエストする。 | |
adBanner.loadAd(new AdRequest()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment