The following sections show you how to load and then show and hide a banner or MREC ad.
Loading a Banner or MREC
The following code shows you how to load a banner or an MREC by using your Ad Unit ID, desired banner position, and (for banners) desired background color.
MAX sizes the ad for you automatically:
MAX automatically sizes banners to 320×50 on phones and 728×90 on tablets.
It sizes MRECs to 300×250 on both phones and tablets.
Use the utility method AppLovinMAX.isTablet() to help with view-sizing adjustments.