package Ġsmart adapter . listener Ċ Ċ /* Ċ Ġ* ĠCreated Ġby ĠMan ne ĠÃĸ hl und Ġon Ġ 0 3 / 1 0 / 1 7 . Ċ Ġ* ĠCopyright ĠÂ© Ġ 2 0 1 7 . ĠAll Ġrights Ġreserved . Ċ Ġ*/ Ċ Ċ import Ġandroidx . recyclerview . widget . RecyclerView Ċ Ċ import Ġsmart adapter . view holder . Smart ViewHolder Ċ Ċ /** Ċ Ġ* ĠListener Ġfor Ġwhen Ġa Ġview Ġcreated Ġby Ġthis Ġadapter Ġhas Ġbeen Ġdet ached Ġfrom Ġits Ġwindow . Ċ Ġ* Ċ Ġ* ĠInv oked Ġfrom Ġ[ smart adapter . Smart Recycler Adapter . on View Detached From Window ] Ġand Ġshould Ġbe Ġimplemented Ġin Ġa Ġ[ Smart ViewHolder ] Ġextension . Ċ Ġ* Ċ Ġ* Ġ@ see ĠRecyclerView . Adapter . on View Detached From Window Ċ Ġ*/ Ċ interface ĠOn View Detached From WindowListener Ġ{ ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠCalled Ġwhen Ġa Ġview Ġcreated Ġby Ġthe Ġadapter Ġhas Ġbeen Ġdet ached Ġfrom Ġits Ġwindow . ĊĠĠĠĠ Ġ* Ġ@ param ĠviewHolder Ġtarget ĠViewHolder ĊĠĠĠĠ Ġ*/ ĊĠĠĠ Ġfun Ġon View Detached From Window ( view Holder : ĠRecyclerView . ViewHolder ) Ċ } Ċ Ċ /** Ċ Ġ* ĠHelper Ġmethod Ġto Ġprovide Ġlambda Ġcall Ġto Ġinterface Ġinstances Ġof Ġ[ On View Detached From WindowListener ]. Ċ Ġ*/ Ċ inline Ġfun Ġon View Detached From WindowListener ( cross inline Ġlistener : Ġ( view Holder : ĠRecyclerView . ViewHolder ) Ġ-> ĠUnit ) Ġ= ĊĠĠĠ Ġobject Ġ: ĠOn View Detached From WindowListener Ġ{ ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġon View Detached From Window ( view Holder : ĠRecyclerView . ViewHolder ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlistener ( view Holder ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ