Issue
I am start working with libGDX and I want to use the AdMob in my Game.
If someone have already worked on it, Give me the way to make this thing happen in the Game ?
Solution
layout = new RelativeLayout(this);
adView = new AdView(this, AdSize.BANNER, adMObid );
View gameView=initializeForView(new TalkingFriendApp(this), cfg);
RelativeLayout.LayoutParams adParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
adParams.addRule(RelativeLayout.ALIGN_PARENT_TOP);
adParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
RelativeLayout.LayoutParams adParams1 = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
adParams1.addRule(RelativeLayout.ALIGN_PARENT_TOP);
adParams1.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
adView.loadAd(new AdRequest());
layout.addView(gameView, adParams);
layout.addView(adView, adParams1);
setContentView(layout);
Answered By - Kumar Saurabh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.