package Ġcom . ner dsc or ner . mvp lib . test app . events . ui . widgets Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . util . Attribute Set Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . widget . LinearLayout Ċ import Ġcom . ner dsc or ner . mvp lib . test app . R Ċ import Ġcom . ner dsc or ner . mvp lib . test app . events . ui . mvp . model . Sample Widget Model Ċ import Ġcom . ner dsc or ner . mvp lib . test app . events . ui . mvp . presenter . Sample Widget Presenter Ċ import Ġcom . ner dsc or ner . mvp lib . test app . events . ui . mvp . view . Sample Widget View Ċ Ċ class ĠSample Widget Ġ@ Jvm Over loads Ġconstructor ( ĊĠĠĠĠĠĠĠ Ġcontext : ĠContext , Ġattrs : ĠAttributeSet ? Ġ= Ġnull , Ġdef Style Attr : ĠInt Ġ= Ġ 0 Ċ ) Ġ: ĠLinearLayout ( context , Ġattrs , Ġdef Style Attr ) Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġpresenter Ġ= ĠSample Widget Presenter ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSample Widget View ( this ), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSample Widget Model () ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ ĠLayoutInflater ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. from ( context ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. inflate ( R . layout . sample _ widget _ layout , Ġthis , Ġtrue ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Attached To Window () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Attached To Window () ĊĠĠĠĠĠĠĠ Ġpresenter . on Attached () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Detached From Window () Ġ{ ĊĠĠĠĠĠĠĠ Ġpresenter . on Detached () ĊĠĠĠĠĠĠĠ Ġsuper . on Detached From Window () ĊĠĠĠ Ġ} Ċ } Ċ