package Ġcom . m ga et an 8 9 . show sr age . extension Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroid . content . SharedPreferences Ċ import Ġandroid . preference . Preference Manager Ċ import Ġandroid . support . annotation . Layout Res Ċ import Ġandroid . text . format . Date Utils Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ Ċ fun ĠContext . get Preferences (): ĠSharedPreferences Ġ= ĠPreference Manager . getDefault SharedPreferences ( this ) Ċ Ċ fun ĠContext . get Localized Time ( dateTime : ĠString , Ġformat : ĠString ): ĠString ? Ġ{ ĊĠĠĠ Ġval Ġtimestamp Ġ= ĠdateTime . to Timestamp ( format ). take If Ġ{ Ġit Ġ> Ġ 0 L Ġ} Ġ?: Ġreturn Ġnull ĊĊĠĠĠ Ġreturn ĠDate Utils . format DateTime ( this , Ġtimestamp , ĠDate Utils . FORMAT _ SHOW _ TIME ) Ċ } Ċ Ċ fun ĠContext . inflate (@ Layout Res Ġlayout Id : ĠInt ): ĠView Ġ{ ĊĠĠĠ Ġreturn ĠLayoutInflater . from ( this ). inflate ( layout Id , Ġnull ) Ċ } Ċ