package Ġcom . android . samples . arch . components basics ample . base Ċ Ċ import Ġandroid . arch . lifecycle . ViewModel Ċ import Ġandroid . arch . lifecycle . ViewModel Providers Ċ import Ġandroid . databinding . Data Binding Util Ċ import Ġandroid . databinding . ViewData Binding Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . support . v 4 . app . Fragment Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ Ċ abstract Ġclass ĠBase Fragment < K Ġ: ĠView Data Binding , ĠV Ġ: ĠViewModel > Ġ: ĠFragment () Ġ{ ĊĊĠ Ġabstract Ġfun Ġget Layout Resource (): ĠInt ĊĊĠ Ġabstract Ġfun Ġinit Data () ĊĊĠ Ġprotected Ġlateinit Ġvar Ġm Binding : ĠK ĊĠ Ġprotected Ġlateinit Ġvar Ġm ViewModel : ĠV ĊĊĠ Ġoverride Ġfun ĠonCreate View ( in flater : ĠLayoutInflater , Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ?): ĠView ? Ġ{ ĊĠĠĠ Ġm Binding Ġ= ĠData Binding Util . inflate ( in flater , Ġget Layout Resource (), Ġcontainer , Ġfalse ) ĊĠĠĠ Ġreturn Ġm Binding . root ĊĠ Ġ} ĊĊĠ Ġoverride Ġfun Ġon Activity Created ( savedInstanceState : ĠBundle ?) Ġ{ ĊĠĠĠ Ġsuper . on Activity Created ( savedInstanceState ) ĊĠĠĠ Ġinit Data () ĊĠ Ġ} Ċ }