@SuppressLint("NewApi") protected void changeToolbarColor(int type, int catID) { // switch (type) { // case TasksTable.TASK_TYPE_COMMING_UP: // catID = 0; // break; // case TasksTable.TASK_TYPE_NEXT_SEVEN_DAYS: // catID = 1; // break; // case TasksTable.TASK_TYPE_ALL_TASKS: // catID = 2; // break; // default: // break; // } String clr = CategoryItem.getDbColod(this, catID); if (clr == null) return; int color = Color.parseColor(clr); toolbar.setBackgroundColor(color); changeStatusBarColor(color); }