package Ġcom . g ado . movie app . binding Ċ Ċ import Ġandroid . widget . ImageView Ċ import Ġandroidx . annotation . NonNull Ċ import Ġandroidx . core . content . Context Compat Ċ import Ġandroidx . databinding . Binding Adapter Ċ import Ġcom . bump tech . glide . G lide Ċ import Ġcom . bump tech . glide . load . engine . Disk Cache Strategy Ċ import Ġcom . bump tech . glide . load . resource . drawable . Drawable Transition Options Ċ import Ġcom . bump tech . glide . request . RequestOptions Ċ import Ġcom . g ado . movie app . R Ċ import Ġcom . g ado . network . EndPoint . BASE _ POST ER _ PATH Ċ import Ġcom . pi er fr ances co so ff rit ti . android youtube player . core . player . YouTube Player Ċ import Ġcom . pi er fr ances co so ff rit ti . android youtube player . core . player . listeners . Abstract YouTube Player Listener Ċ import Ġcom . pi er fr ances co so ff rit ti . android youtube player . core . player . views . YouTube Player View ĊĊ Ċ @ Binding Adapter (" binding Post Url ") Ċ fun Ġbinding Post Url ( imageView : ĠImageView , Ġpath : ĠString ?) Ġ{ ĊĠĠĠ ĠG lide . with ( imageView . context ) ĊĠĠĠĠĠĠĠ Ġ. load ("$ BASE _ POST ER _ PATH $ path ") ĊĠĠĠĠĠĠĠ Ġ. error ( Context Compat . get Drawable ( imageView . context , ĠR . mip map . ic _ launcher )) ĊĠĠĠĠĠĠĠ Ġ. transition ( Drawable Transition Options . with Cross Fade ()) ĊĠĠĠĠĠĠĠ Ġ. disk Cache Strategy ( Disk Cache Strategy . DATA ) ĊĠĠĠĠĠĠĠ Ġ. into ( imageView ) Ċ } Ċ @ Binding Adapter (" binding Circle Post Url ") Ċ fun Ġbinding Circle Post Url ( imageView : ĠImageView , Ġpath : ĠString ?) Ġ{ ĊĠĠĠ ĠG lide . with ( imageView . context ) ĊĠĠĠĠĠĠĠ Ġ. load ("$ BASE _ POST ER _ PATH $ path ") ĊĠĠĠĠĠĠĠ Ġ. error ( Context Compat . get Drawable ( imageView . context , ĠR . mip map . ic _ launcher )) ĊĠĠĠĠĠĠĠ Ġ. transition ( Drawable Transition Options . with Cross Fade ()) ĊĠĠĠĠĠĠĠ Ġ. disk Cache Strategy ( Disk Cache Strategy . DATA ) ĊĠĠĠĠĠĠĠ Ġ. apply ( RequestOptions (). circle Crop ()) ĊĠĠĠĠĠĠĠ Ġ. into ( imageView ) Ċ } Ċ Ċ @ Binding Adapter (" load YouTube ") Ċ fun Ġload YouTube ( you Tube Player View : ĠYouTube Player View , Ġkey : ĠString ) Ġ{ ĊĠĠĠ Ġyou Tube Player View . add YouTube Player Listener ( object Ġ: ĠAbstract YouTube Player Listener () Ġ{ ĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġon Ready (@ NonNull Ġyou Tube Player : ĠYouTube Player ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġyou Tube Player . load Video ( key , Ġ 0 f ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġyou Tube Player . pause () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ}) Ċ } ĊĊĊĊ ĊĊĊĊĊ