public static void setBgColor ( View view , final Config config ) { int [ ] colors = view . getContext ( ) . getResources ( ) . getIntArray ( R . array . bg_colors ) ; final int bgColor = colors [ config . bgColor ] ; view . setBackgroundColor ( bgColor ) ; }
Utility method which set the bgColor based on configuration values