package Ġt aiwan . no 1 . app . mvp . present ers . adapter Ċ Ċ import Ġandroid . graphics . Bitmap Ċ import Ġandroid . graphics . Color Ċ import Ġandroid . graphics . Color . LT GRAY Ċ import Ġcom . hw ang jr . r xb us . Rx Bus Ċ import Ġcom . touch in . constant . R xb us Tag Ċ import Ġt aiwan . no 1 . app . api . config . TM DB Config . BASE _ IMAGE _ URL Ċ import Ġt aiwan . no 1 . app . mvp . contracts . adapter . Cast ListAdapter Contract . Presenter Ċ import Ġt aiwan . no 1 . app . mvp . contracts . adapter . Cast ListAdapter Contract . View Ċ import Ġt aiwan . no 1 . app . mvp . models . cast . Cast Brief Model Ċ import Ġt aiwan . no 1 . app . ui . fragments . Cast Detail Fragment Ċ import Ġt aiwan . no 1 . app . ui . fragments . ViewPager Main Ctrl Fragment . Factory . NAV IG ATOR _ ARG _ FRAGMENT Ċ import Ġt aiwan . no 1 . app . ui . fragments . ViewPager Main Ctrl Fragment . Factory . NAV IG ATOR _ ARG _ TAG Ċ Ċ /** Ċ Ġ* Ċ Ġ* Ġ@ author Ġ ĠJ i ey i Ċ Ġ* Ġ@ since ĠĠĠ 2 / 2 1 / 1 7 Ċ Ġ*/ Ċ Ċ class ĠCast ListAdapter Presenter : ĠBase Adapter Presenter < View , ĠCast Brief Model >(), ĠPres enter Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġinit ( view Holder : ĠView , Ġmodel : ĠCast Brief Model ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . init ( view Holder , Ġmodel ) ĊĊĠĠĠĠĠĠĠ Ġthis . view Holder . show Profile ( BASE _ IMAGE _ URL Ġ+ Ġthis . model . profile _ path ) ĊĠĠĠĠĠĠĠ Ġthis . view Holder . show Tv Name ( this . model . name . or Empty ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Item Clicked ( tag : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ ĠRx Bus . get (). post ( R xb us Tag . FRAGMENT _ CHILD _ NAV IG ATOR , Ġhash Map Of ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠPair ( NAV IG ATOR _ ARG _ FRAGMENT , ĠCast Detail Fragment . newInstance ( model . id . toString (), Ġtag )), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠPair ( NAV IG ATOR _ ARG _ TAG , Ġtag ))) Ċ // ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠPair ( ViewPager Main Ctrl Fragment . NAV IG ATOR _ ARG _ SHARED _ ELEMENT S , Ċ // ĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġhash Map Of ( Pair ( iv Post er , Ġiv Post er . transition Name ))))) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Resource Finished ( bitmap : ĠBitmap ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . capture Color ( bitmap ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit . get Dark V ibr ant Color ( Color . arg b ( 1 5 3 , Ġ 7 9 , Ġ 7 9 , Ġ 7 9 )). let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ// ĠSet Ġthe Ġfog Ġin Ġfront Ġof Ġthe Ġback drop . ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . view Holder . show Tv Name Bg Color ( Color . arg b ( 1 5 3 , ĠColor . red ( it ), ĠColor . green ( it ), ĠColor . blue ( it ))) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġthis . view Holder . show Tv Name TextColor ( it . dark V ibr ant Sw atch ?. title TextColor Ġ?: ĠLT GRAY ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġthis . view Holder . reset Height Ratio ( bitmap . height Ġ/ Ġbitmap . width . toFloat ()) ĊĠĠĠ Ġ} Ċ } Ġ