# onBindItemView

@ JvmOverloads
fun < E > BaseAdapterBuilder< E >. onBindItemView (Hikageable: HikagePerformer< ViewGroup.LayoutParams >, viewHolder: (hikage: Hikage, entity: E , position: Int ) -> Unit = { _, _, _ -> }): BaseAdapterBuilder< E >

Create and add view holder from Hikage.Delegate.

Usage:

    onBindItemView(
        Hikageable = {
            TextView(
                id = "text",
                lparams = LayoutParams(widthMatchParent = true)
            ) {
                text = "Item"
                textSize = 20f
            }
       }
    ) { hikage, entity, position ->
        hikage.get<TextView>("text").text = "Item ${entity.name} of ${position + 1}"
    }

Content copied to clipboard

#### Receiver

BaseAdapterBuilder<E>

#### Return

BaseAdapterBuilder<E>

#### Parameters

Hikageable

the performer body.

#### See also

BaseAdapterBuilder.onBindItemView

@ JvmOverloads
fun < E > BaseAdapterBuilder< E >. onBindItemView (delegate: Hikage.Delegate<*>, viewHolder: (hikage: Hikage, entity: E , position: Int ) -> Unit = { _, _, _ -> }): BaseAdapterBuilder< E >

Create and add view holder from Hikage.Delegate.

#### Receiver

BaseAdapterBuilder<E>

#### Return

BaseAdapterBuilder<E>

#### Parameters

delegate

the delegate.

#### See also

BaseAdapterBuilder.onBindItemView

@ JvmOverloads
fun < E > RecyclerAdapterBuilder< E >. onBindItemView (Hikageable: HikagePerformer< ViewGroup.LayoutParams >, viewType: Int = RecyclerAdapterBuilder.DEFAULT_VIEW_TYPE, viewHolder: (hikage: Hikage, entity: E , position: AdapterPosition) -> Unit = { _, _, _ -> }): RecyclerAdapterBuilder< E >

Create and add view holder from Hikage.Delegate.

Usage:

    onBindItemView(
        Hikageable = {
            TextView(
                id = "text",
                lparams = LayoutParams(widthMatchParent = true)
            ) {
                text = "Item"
                textSize = 20f
            }
       }
    ) { hikage, entity, position ->
        hikage.get<TextView>("text").text = "Item ${entity.name} of ${position.value + 1}"
    }

Content copied to clipboard

#### Receiver

RecyclerAdapterBuilder<E>

#### Return

RecyclerAdapterBuilder<E>

#### Parameters

Hikageable

the performer body.

#### See also

RecyclerAdapterBuilder.onBindItemView

@ JvmOverloads
fun < E > RecyclerAdapterBuilder< E >. onBindItemView (delegate: Hikage.Delegate<*>, viewType: Int = RecyclerAdapterBuilder.DEFAULT_VIEW_TYPE, viewHolder: (hikage: Hikage, entity: E , position: AdapterPosition) -> Unit = { _, _, _ -> }): RecyclerAdapterBuilder< E >

Create and add view holder from Hikage.Delegate.

#### Receiver

RecyclerAdapterBuilder<E>

#### Return

RecyclerAdapterBuilder<E>

#### Parameters

delegate

the delegate.

#### See also

RecyclerAdapterBuilder.onBindItemView