com.yandex.mobile.ads.nativeads
Class SliderAdLoader
java.lang.Object
com.yandex.mobile.ads.nativeads.SliderAdLoader
public class SliderAdLoader
extends java.lang.Object
Class containing controls for slider ad loading.
Constructor Summary
Constructor and Description |
---|
SliderAdLoader(android.content.Context context)
Constructs a new
SliderAdLoader with specific configuration. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void | cancelLoading()
Cancel loading the native ad.
|
void | loadSlider(NativeAdRequestConfiguration nativeAdRequestConfiguration)
Start loading the native ad unit by
AdRequest on a background thread. |
void | setSliderAdLoadListener(SliderAdLoadListener listener)
Register a callback for listening native ad loader.
|
Constructor Detail
SliderAdLoader
public SliderAdLoader(@NonNull android.content.Context context)
Constructs a new
SliderAdLoader
with specific configuration.- Parameters:
context
- The activity context used to retrieve the application context.
Method Detail
setSliderAdLoadListener
public void setSliderAdLoadListener(@Nullable SliderAdLoadListener listener)
Register a callback for listening native ad loader.
- Parameters:
listener
- anSliderAdLoadListener
object that handles lifecycle native ad unit.
loadSlider
public void loadSlider(@NonNull NativeAdRequestConfiguration nativeAdRequestConfiguration)
Start loading the native ad unit by
AdRequest
on a background thread.- Parameters:
nativeAdRequestConfiguration
- an object of theAdRequest
class with data for a targeted ad request.
cancelLoading
public void cancelLoading()
Cancel loading the native ad.