package Ġcom . str v academy . dr ab ek j . movie app . ui . movies Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . database . Cursor Ċ import Ġandroid . databinding . Data Binding Util Ċ import Ġandroid . databinding . ViewData Binding Ċ import Ġandroid . support . v 4 . widget . Cursor Adapter Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġcom . str v academy . dr ab ek j . movie app . R Ċ import Ġandroid . view . LayoutInflater Ċ import Ġcom . str v academy . dr ab ek j . movie app . BR Ċ import Ġcom . str v academy . dr ab ek j . movie app . model . entity . Actor Entity ĊĊ Ċ class ĠSearch Actor Results Adapter ( context : ĠContext ?, Ġc : ĠCursor ?, Ġflags : ĠInt ) Ġ: ĠCursor Adapter ( context , Ġc , Ġflags ) Ġ{ Ċ ĉ comp anion Ġobject Ġ{ Ċĉ ĉ val ĠRESULT _ COLUMN _ ID Ġ= Ġ"_ id " Ċĉ ĉ val ĠRESULT _ COLUMN _ NAME Ġ= Ġ" name " Ċĉ ĉ val ĠRESULT _ COLUMN _ PROFILE _ PATH Ġ= Ġ" profile Path " Ċ ĉ } ĊĊ ĉ override Ġfun Ġnew View ( context : ĠContext ?, Ġcursor : ĠCursor ?, Ġparent : ĠViewGroup ?): ĠView Ġ{ Ċĉ ĉ val Ġsearch Movie Item Binding Ġ= ĠData Binding Util . inflate < ViewData Binding >( LayoutInflater . from ( context ), ĠR . layout . search _ actor _ item , Ġparent , Ġfalse ) ĊĊĉ ĉ return Ġsearch Movie Item Binding !!. root Ċ ĉ } ĊĊ ĉ override Ġfun Ġbind View ( view : ĠView ?, Ġcontext : ĠContext ?, Ġcursor : ĠCursor ?) Ġ{ Ċĉ ĉ val Ġbinding Ġ= ĠData Binding Util . get Binding < ViewData Binding >( view ) ĊĊĉ ĉ val Ġactor Ġ= ĠActor Entity () Ċĉ ĉ actor . id Ġ= Ġcursor ?. getInt ( Ġcursor . getColumnIndex ( RESULT _ COLUMN _ ID ) Ġ) Ċĉ ĉ actor . name Ġ= Ġcursor ?. getString ( Ġcursor . getColumnIndex ( RESULT _ COLUMN _ NAME ) Ġ) Ċĉ ĉ actor . profile Path Ġ= Ġcursor ?. getString ( Ġcursor . getColumnIndex ( RESULT _ COLUMN _ PROFILE _ PATH ) Ġ) ĊĊĉ ĉ binding . set Variable ( BR . data , Ġactor ) Ċ ĉ } Ċ }