package Ġcom . kar ans yd 4 . poke dex . ui . poke dex detail Ċ Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ import Ġco il . load Ċ import Ġcom . kar ans yd 4 . poke dex . databinding . Item ElementType Binding Ċ import Ġcom . kar ans yd 4 . poke dex . util . Util Ċ Ċ class ĠElementType ViewHolder ( private Ġval Ġelement Type Binding : ĠItem ElementType Binding ) Ġ: ĊĠĠĠ ĠRecyclerView . ViewHolder ( elementType Binding . root ) Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠTAG Ġ= Ġ" Po ke dex ViewHolder _ Kar " ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġbind ( weak To Type : ĠString ) Ġ= Ġwith ( elementType Binding ) Ġ{ ĊĊĠĠĠĠĠĠĠ Ġelement Type Binding . iv Element Icon . load ( Util . getElement Image From ElementType ( weak To Type . lowercase ())) ĊĠĠĠĠĠĠĠ Ġelement Type Binding . txt ElementType . text Ġ= Ġweak To Type ĊĊĠĠĠĠĠĠĠ Ġ// ĠA 1 1 y ĊĠĠĠĠĠĠĠ Ġelement Type Parent Layout . content Description Ġ= Ġweak To Type ĊĠĠĠ Ġ} Ċ } Ċ