package Ġcom . nee player . ui . common Ċ Ċ import Ġandroid . graphics . drawable . Drawable Ċ import Ġandroid . widget . ImageView Ċ import Ġandroid . widget . TextView Ċ import Ġandroidx . databinding . Binding Adapter Ċ import Ġcom . bump tech . glide . G lide Ċ import Ġjava . util . concurrent . TimeUnit Ċ Ċ @ Binding Adapter (" image Uri ") Ċ fun Ġload Image ( view : ĠImageView , Ġuri : ĠString ?) Ġ= ĠG lide . with ( view . context ). run Ġ{ ĊĠĠĠ Ġif Ġ( uri Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠ Ġload ( uri ). into ( view ) ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ Ġclear ( view ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Binding Adapter (" drawable ") Ċ fun Ġset Drawable ( view : ĠImageView , Ġdrawable : ĠDrawable ) Ġ= Ġview . setImage Drawable ( drawable ) Ċ Ċ @ Binding Adapter (" duration ") Ċ fun Ġset Formatted Duration ( view : ĠTextView , Ġduration : ĠInt ) Ġ{ ĊĠĠĠ Ġval Ġmin Ġ= ĠTimeUnit . MILLISECONDS . to Minutes ( duration . to Long ()) ĊĠĠĠ Ġval Ġsec Ġ= ĠTimeUnit . MILLISECONDS . to Seconds ( duration . to Long ()) Ġ- ĠTimeUnit . MIN UTES . to Seconds ( min ) ĊĠĠĠ Ġview . text Ġ= Ġ"% d :% 0 2 d ". format ( min , Ġsec ) Ċ } Ċ