I'm trying to integrate ads into my Android app using AdWhirl and AdMob.
The AdWhirl site gave me the following code to use:
AdWhirlLayout adWhirlLayout = (AdWhirlLayout) findViewById(R.id.layoutAdWhirl);
int diWidth = 320;
int diHeight = 52;
int density = (int) getResources().getDisplayMetrics().density;
int scaledWidth = (int) (diWidth * density);
int scaledHeight = (int) (diHeight * density);
adWhirlLayout.setAdWhirlInterface(this);
adWhirlLayout.setMaxWidth(scaledWidth);
adWhirlLayout.setMaxHeight(scaledHeight);
This works just fine on some of my emulators, but when I try some smaller or older emulators, I get the following error in LogCat:
Not enough space to show ad! Wants: 480, 75, Has: 320, 52
What am I supposed to do if I'm using their code for requesting an appropriately sized ad, but then they won't display that ad?