package Ġio . github . my ol win 0 0 . sun sh ine . app . forecast s Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . fragment . app . view Models Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġandroidx . lifecycle . observe Ċ import Ġdagger . android . support . D agger Fragment Ċ import Ġio . github . my ol win 0 0 . sun sh ine . app . Sun sh ine App Ċ import Ġio . github . my ol win 0 0 . sun sh ine . databinding . Fragment Forecast s Binding Ċ import Ġtim ber . log . Tim ber Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠFore casts Fragment Ġ: ĠD agger Fragment () Ġ{ ĊĊĠĠĠ Ġ@ Inject ĊĠĠĠ Ġlateinit Ġvar ĠviewModel Factory : ĠViewModel Provider . Factory ĊĠĠĠ Ġprivate Ġval Ġforecast s ViewModel : ĠFore casts ViewModel Ġby Ġview Models Ġ{ ĠviewModel Factory Ġ} ĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠFragment Forecast s Binding ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ?): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠFragment Forecast s Binding . inflate ( in flater , Ġcontainer , Ġfalse ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. also Ġ{ Ġbinding Ġ= Ġit Ġ}. root ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon View Created ( view : ĠView , ĠsavedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . on View Created ( view , ĠsavedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġval Ġadapter Ġ= ĠFore casts Adapter () ĊĠĠĠĠĠĠĠ Ġbinding . apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlifecycle Owner Ġ= Ġview Lifecycle Owner ĊĠĠĠĠĠĠĠĠĠĠĠ ĠviewModel Ġ= Ġforecast s ViewModel ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrv Forecast s . adapter Ġ= Ġadapter ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }