package Ġcom . simple mobile tools . calendar . extensions Ċ Ċ import Ġandroid . content . res . Resources Ċ import Ġandroid . graphics . Bitmap Ċ import Ġandroid . graphics . Port er D uff Ċ import Ġandroid . graphics . drawable . Bitmap Drawable Ċ import Ġandroid . widget . TextView Ċ Ċ fun ĠTextView . add Res ized Background Drawable ( res : ĠResources , Ġdrawable Height : ĠInt , Ġprimary Color : ĠInt , Ġdrawable Id : ĠInt ) Ġ{ ĊĠĠĠ Ġval Ġbase Drawable Ġ= Ġres . get Drawable ( drawable Id ) ĊĠĠĠ Ġval Ġbitmap Ġ= Ġ( base Drawable Ġas ĠBitmap Drawable ). bitmap ĊĠĠĠ Ġval Ġscaled Drawable Ġ= ĠBitmap Drawable ( res , ĠBitmap . create Scaled Bitmap ( bitmap , Ġdrawable Height , Ġdrawable Height , Ġtrue )) ĊĠĠĠ Ġscaled Drawable . mutate (). setColor Filter ( primary Color , ĠPort er D uff . Mode . SRC _ IN ) ĊĠĠĠ Ġbackground Ġ= Ġscaled Drawable Ċ } Ċ