package Ġk g . del let en eb re . y am us . ui . home Ċ Ċ import Ġandroid . support . v 4 . media . Media Browser Compat Ċ import Ġandroidx . databinding . library . base Adapters . BR Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . viewModel Scope Ċ import Ġk g . del let en eb re . y am us . R Ċ import Ġk g . del let en eb re . y am us . media . library . Media Library Ċ import Ġk g . del let en eb re . y am us . ui . On Media ItemClickListener Ċ import Ġkotlinx . coroutines . launch Ċ import Ġme . tat ark a . binding collection adapter 2 . Item Binding ĊĊ Ċ class ĠHome ViewModel Ġ: ĠViewModel (), ĠOn Media ItemClickListener Ġ{ ĊĠĠĠ Ġvar Ġitem ClickListener Of Fragment : ĠOn Media ItemClickListener ? Ġ= Ġnull ĊĠĠĠ Ġoverride Ġfun ĠonClick ( item : ĠMedia Browser Compat . Media Item ) Ġ{ ĊĠĠĠĠĠĠĠ Ġitem ClickListener Of Fragment ?. onClick ( item ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġval Ġblock Personal Play lists : ĠMutable LiveData < List < Media Browser Compat . Media Item >> Ġ= ĠMutable LiveData () ĊĠĠĠ Ġval Ġblock Personal Play lists Binding Ġ= ĠItem Binding . of < Media Browser Compat . Media Item >( BR . item , ĠR . layout . personal _ playlist _ item ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. bind Extra ( BR . listener , Ġthis ) ĊĊĠĠĠ Ġval Ġblock Mix es : ĠMutable LiveData < List < Media Browser Compat . Media Item >> Ġ= ĠMutable LiveData () ĊĠĠĠ Ġval Ġblock Mix es Binding Ġ= ĠItem Binding . of < Media Browser Compat . Media Item >( BR . item , ĠR . layout . mix _ item ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. bind Extra ( BR . listener , Ġthis ) ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ ĠviewModel Scope . launch Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġblock Personal Play lists . value Ġ= ĠMedia Library . get Personal Play lists () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġblock Mix es . value Ġ= ĠMedia Library . get Mix es () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }