AirshipEmbeddedView

constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0)(source)

Constructor for inflating from XML.

Parameters

context

The context.

attrs

The attribute set.

defStyle

The default style.


constructor(context: Context, embeddedId: String, selection: AirshipEmbeddedSelection = AirshipEmbeddedSelection.Priority, @LayoutRes placeholderRes: Int? = null)(source)

Constructs an embedded view that will display content for the given embedded ID.

Parameters

context
embeddedId

the embedded ID.

selection

the AirshipEmbeddedSelection that controls which instance is displayed.

placeholderRes

optional placeholder layout resource to display when no content is available.


constructor(context: Context, embeddedId: String, selection: AirshipEmbeddedSelection, @LayoutRes placeholderRes: Int?, filterInstances: AirshipEmbeddedFilter?)(source)

Constructs an embedded view that will display content for the given embedded ID, with an eligibility filter.

Parameters

context
embeddedId

the embedded ID.

selection

the AirshipEmbeddedSelection that controls which instance is displayed.

placeholderRes

placeholder layout resource to display when no content is available, or null for none.

filterInstances

AirshipEmbeddedFilter deciding which instances are eligible, or null to keep every pending instance. Applied before selection, so an excluded instance is never displayed even when selection targets it.


constructor(context: Context, embeddedId: String, comparator: Comparator<AirshipEmbeddedInfo>?, @LayoutRes placeholderRes: Int? = null)(source)

Deprecated

Use the constructor that takes AirshipEmbeddedSelection instead.

Constructs an embedded view that will display content for the given embedded ID.

Parameters

context
embeddedId

the embedded ID.

comparator

optional Comparator used to sort available embedded contents.

placeholderRes

optional placeholder layout resource to display when no content is available.