move calculatecolor from adapter to activity
MainActivity and CaseActivity implements OnSharedPreferenceChangeListener