package Ġcom . ny iny i ht un l win . projects . food ah olic . mv vm . view models Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . view . View Ċ import Ġcom . ny iny i ht un l win . projects . food ah olic . activities . Bookmark Activity Ċ import Ġcom . ny iny i ht un l win . projects . food ah olic . activities . Info Activity Ċ import Ġcom . ny iny i ht un l win . projects . food ah olic . activities . Search Activity Ċ import Ġjava . lang . ref . Weak Reference Ċ Ċ class ĠMain ViewModel ( var Ġcontext Weak Reference : ĠWeak Reference < Context >) Ġ: ĠBase ViewModel () Ġ{ ĊĠĠĠ Ġoverride Ġfun ĠonStart () Ġ{ ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠonTap Search ( view : ĠView ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcontext Weak Reference . get () !!. startActivity ( Search Activity . new Inst n ace ( context Weak Reference . get () !! )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠonTap Bookmark ( view : ĠView ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcontext Weak Reference . get () !!. startActivity ( Bookmark Activity . newInstance ( context Weak Reference . get () !! )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠonTap Info ( view : ĠView ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcontext Weak Reference . get () !!. startActivity ( Info Activity . newInstance ( context Weak Reference . get () !! )) ĊĠĠĠ Ġ} Ċ }