DisplayMetrics dm = new DisplayMetrics();
activity.getWindowManager().getDefaultDisplay().getMetrics(dm);
int screenWidth = dm.widthPixels;
String myAdId = "MY_LEADBOLT_SECTIONID_320";
if(screenWidth >= 720) {
myAdId = "MY_LEADBOLT_SECTIONID_720";
}
else if(screenWidth >= 640) {
myAdId = "MY_LEADBOLT_SECTIONID_640";
}
else if(screenWidth >= 468) {
myAdId = "MY_LEADBOLT_SECTIONID_468";
}
AdController myController = new AdController(activity, myAdId);
myController.setAsynchTask(true);
myController.loadAd();
No comments:
Post a Comment