package Ġcom . google . developer . bug master . presentation Ċ Ċ import Ġandroid . support . v 7 . widget . RecyclerView Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroid . widget . ImageView Ċ import Ġandroid . widget . TextView Ċ import Ġcom . google . common . collect . ImmutableList Ċ import Ġcom . google . developer . bug master . R Ċ import Ġcom . google . developer . bug master . data . models . In sect DataModel Ċ import Ġjava . util . Collections . addAll Ċ import Ġkotlin . properties . Deleg ates Ċ Ċ class ĠIn sect Adapter ( private Ġvar Ġin sect List : ĠMutable List < In sect DataModel >) ĊĠĠĠ Ġ: ĠRecyclerView . Adapter < In sect Adapter . Custom In sect Holder >() Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ViewHolder ( parent : ĠViewGroup , Ġview Type : ĠInt ): ĠCustom In sect Holder Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġview Ġ= ĠLayoutInflater . from ( parent . context ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. inflate ( R . layout . in sect _ row _ item , Ġparent , Ġfalse ) ĊĊĠĠĠĠĠĠĠ Ġreturn ĠCustom In sect Holder ( view ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Bind ViewHolder ( holder : ĠCustom In sect Holder , Ġposition : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġholder . tv Friendly Name . text Ġ= Ġin sect List [ position ]. friendly Name ĊĠĠĠĠĠĠĠ Ġholder . tv Sc ientific Name . text Ġ= Ġin sect List [ position ]. scientific Name ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetItem Count (): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġin sect List . size ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġload In sect s ( in sect List : ĠMutable List < In sect DataModel >) Ġ{ ĊĠĠĠĠĠĠĠ Ġprintln ( in sect List . java Class ) ĊĠĠĠĠĠĠĠ Ġprintln ( this . in sect List . java Class ) ĊĊĠĠĠĠĠĠĠ Ġthis . in sect List . addAll ( in sect List ) ĊĊĠĠĠĠĠĠĠ Ġnotify DataSet Changed () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġclass ĠCustom In sect Holder ( item View : ĠView ) Ġ: ĠRecyclerView . ViewHolder ( item View ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġiv D anger Level : ĠImageView Ġ= ĠitemView . findViewById ( R . id . iv D anger Level ) ĊĠĠĠĠĠĠĠ Ġval Ġtv Friendly Name : ĠTextView Ġ= ĠitemView . findViewById ( R . id . tv Friendly Name ) ĊĠĠĠĠĠĠĠ Ġval Ġtv Sc ientific Name : ĠTextView Ġ= ĠitemView . findViewById ( R . id . tv Sc ientific Name ) ĊĠĠĠ Ġ} Ċ } Ċ