package Ġcom . example . android . l ifec yc les . ar ap _ os aka Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġcom . example . android . code labs . lifecycle . R Ċ import Ġtim ber . log . Tim ber Ċ Ċ /** Ċ Ġ* ĠA Ġplaceholder Ġfragment Ġcontaining Ġa Ġsimple Ġview . Ċ Ġ*/ Ċ class ĠBL ife Cycle Log Fragment Ġ: ĠFragment () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( ĊĠĠĠĠĠĠĠ Ġinflater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ? ĊĠĠĠ Ġ): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ ĠTim ber . d (" onCreate View : Ġ$ savedInstanceState ") ĊĠĠĠĠĠĠĠ Ġreturn Ġinflater . inflate ( R . layout . fragment _ b _ lifecycle , Ġcontainer , Ġfalse ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Attach ( context : ĠContext ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Attach ( context ) ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Attach : Ġcontext =${ getContext ()}, Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Attach Fragment ( child Fragment : ĠFragment ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Attach Fragment ( child Fragment ) ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Attach Fragment : Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on View Created : Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Activity Created ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Activity Created ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Activity Created : Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠTim ber . d (" onCreate : ĠsavedInstanceState =$ savedInstanceState , Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonStart () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . onStart () ĊĠĠĠĠĠĠĠ ĠTim ber . d (" onStart : Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Resume () Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Resume () ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Resume : Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Save InstanceState ( out State : ĠBundle ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on Save InstanceState ( out State ) ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Save InstanceState : Ġcontext =$ context , Ġout State =$ out State , Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Pause () Ġ{ ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Pause : Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠĠĠĠĠ Ġsuper . on Pause () ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Pause : Ġafter Ġsuper . on Pause Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Detach () Ġ{ ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Detach : Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠĠĠĠĠ Ġsuper . on Detach () ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Detach : Ġafter Ġsuper . on Detach Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Destroy View () Ġ{ ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Destroy View : Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠĠĠĠĠ Ġsuper . on Destroy View () ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Destroy View : Ġafter Ġsuper . on Destroy View Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Stop () Ġ{ ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Stop : Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠĠĠĠĠ Ġsuper . on Stop () ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Stop : Ġafter Ġsuper . on Stop Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon ViewState Restore d ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on ViewState Restore d ( savedInstanceState ) ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on ViewState Restore d : ĠsavedInstanceState =$ savedInstanceState , Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Destroy () Ġ{ ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Destroy : Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠĠĠĠĠ Ġsuper . on Destroy () ĊĠĠĠĠĠĠĠ ĠTim ber . d (" on Destroy : Ġafter Ġsuper . on Destroy Ġcontext =$ context , Ġactivity =$ activity ") ĊĠĠĠ Ġ} Ċ } Ċ