CarouselAdView

class CarouselAdView : BaseCarouselAdView, CarouselAdClient

View object for carousel ads. Ad spot ID or Ad spot Code must be set prior to calling show().

-> Sample Code

Since

1.6.0

Constructors

Link copied to clipboard
fun CarouselAdView(context: Context)
Link copied to clipboard
fun CarouselAdView(context: Context, attrs: AttributeSet?)
Link copied to clipboard
fun CarouselAdView(context: Context, attrs: AttributeSet?, defStyleAttr: Int)
Link copied to clipboard
fun CarouselAdView(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int)

Types

Link copied to clipboard
object LayoutParams

Functions

Link copied to clipboard
open override fun add(vararg adViews: AdView): CarouselAdView

Add an AdView instance to display ads.
Do not execute the show method of the AdView to be added.

Link copied to clipboard
open override fun addAdSpotCode(vararg adSpotCode: String): CarouselAdView

Add the AdSpot code.

open override fun addAdSpotCode(adSpotCode: String, property: JSONObject?): CarouselAdView

Add a code with a property for customization.

Link copied to clipboard
open override fun addAdSpotId(vararg adSpotIds: String): CarouselAdView

Add the AdSpot IDs.

open override fun addAdSpotId(adSpotId: String, property: JSONObject?): CarouselAdView

Add an ID with a property for customization.

Link copied to clipboard
open override fun clearAdSpotCodes()

Clear the added AdSpot codes.

Link copied to clipboard
open override fun clearAdSpotIds()

Clear the added AdSpot IDs.

Link copied to clipboard
open override fun clearAdViews()

Clear the added AdViews.

Link copied to clipboard
open override fun getAdSpotCodes(): Array<Pair<String, JSONObject?>>

Returns the added AdSpot codes.

Link copied to clipboard
open override fun getAdSpotIds(): Array<Pair<String, JSONObject?>>

Returns the added AdSpot IDs.

Link copied to clipboard
open override fun getAdViews(): Array<AdView>

Returns the added AdViews with array.

Link copied to clipboard
open override fun getProperty(): Bundle

Returns the added properties with Bundle.

Link copied to clipboard
open override fun isLoading(): Boolean

Returns whether it is loading with Boolean.

Link copied to clipboard
open override fun putProperty(key: String, value: Any): CarouselAdView

Specify any key/value required for customization.

Link copied to clipboard
open override fun setProperty(value: Bundle)
Link copied to clipboard
open override fun show()

Performs ad loading.

Properties

Link copied to clipboard
open override var adsSeparatorWidth: Int

Ad-to-ad spacing width.
Default value is 0

Link copied to clipboard
open override var carouselAdStateListener: CarouselAdStateListener?

The event callback of CarouselAdView
Sets Listener to detect CarouselAdView events.

Link copied to clipboard
open override var indicatorBackground: Int

This property allows you to change the design of the indicator.
Specify the Drawable resource id.

Link copied to clipboard
open override var isIndicatorEnabled: Boolean

Enables the display of the indicator.
Default value is false

Link copied to clipboard
open override var isPagerSnapEnabled: Boolean

If set to true, it will be a sticky move like ViewPager
Default value is false

Link copied to clipboard
open override var nestedAdsCustomHeight: Int

If you set CUSTOM to nestedAdsSize, you can change the height of the ads displayed in CarouselAdView to any size. However, if you set a value for this property, set nestedAdsCustomHeight to LayoutParams.WRAP_CONTENT (Because it keeps the ratio of the original size.).
Default value is 0

Link copied to clipboard
open override var nestedAdsCustomWidth: Int

If you set CUSTOM to nestedAdsSize, you can change the width of the ads displayed in CarouselAdView to any size.
However, if you set a value for this property, set nestedAdsCustomHeight to LayoutParams.WRAP_CONTENT (Because it keeps the ratio of the original size.).
Default value is 0

Link copied to clipboard
open override var nestedAdsSize: AdSize

Specifies the size of the ad to display within the CarouselAdView frame.
Default value is AdSize.DEFAULT

Link copied to clipboard
open override var overhangWidth: Int

Overhang width of adjacent ads when isPagerSnapEnabled is enabled.
Default value is 0