@Retention(value=CLASS)
public @interface OnCreateMountContent
MountSpec
, when the pool of objects corresponding to this mount content type is empty and
recycling is not possible. The mount content can be either a View or a Drawable.
You can think of methods annotated with OnCreateMountContent
as the equivalent of the
RecyclerView.Adapter's createViewHolder method. If the pool for this mount content is not empty
and the framework can recycle mount content objects, this method will not be invoked.
The annotated method will return the created mount content, either a View or a Drawable type, and receives the following arguments from the framework:
Required:
Prop
, State
or any inter-stage props are allowed in
this method.
The OnCreateMountContent method cannot provide inter-stage props.
OnCreateMountContentPool
,
OnMount
Modifier and Type | Optional Element and Description |
---|---|
MountingType |
mountingType
The type of class used for the mount content.
|
public abstract MountingType mountingType