Class StaticCompanionLoader
-
- All Implemented Interfaces:
public final class StaticCompanionLoader extends CompanionLoader
A loader implementation for static companion ads.
This class is responsible for loading and displaying static image companion ads. It handles image loading, memory management, and cleanup of resources.
-
-
Constructor Summary
Constructors Constructor Description StaticCompanionLoader(Context context, InMobiLogger logger)
-
Method Summary
Modifier and Type Method Description Viewinflate(Resource resource)Inflates a static companion ad view and loads the image content. Unitdestroy()Cleans up resources by canceling any pending image loads. final Bitmap.ConfiggetImageBitMapConfig()Determines the appropriate bitmap configuration based on device memory state. -
-
Constructor Detail
-
StaticCompanionLoader
StaticCompanionLoader(Context context, InMobiLogger logger)
- Parameters:
context- The application context.logger- An optional logger for debugging and error reporting.
-
-
Method Detail
-
inflate
View inflate(Resource resource)
Inflates a static companion ad view and loads the image content.
-
getImageBitMapConfig
final Bitmap.Config getImageBitMapConfig()
Determines the appropriate bitmap configuration based on device memory state. Uses RGB_565 for low memory devices and ARGB_8888 for devices with sufficient memory.
- Returns:
The appropriate Bitmap.Config for the current device state.
-
-
-
-