Populate the days list based on what the first day of the week is
for the current locale. Ex. Sunday is the first item in the
list for US, whereas Monday is for UK
Change-Id: Ib3c03a59cee73cfcd809fb115a5d49e5eb7c2e45
TICKET: CYNGNOS-3181
}
mLayout.setOrientation(LinearLayout.VERTICAL);
final Calendar c = Calendar.getInstance();
+ int i = c.getFirstDayOfWeek() - 1;
final LayoutInflater inflater = LayoutInflater.from(context);
- for (int i = 0; i < DAYS.length; i++) {
+ for (int d = 0; d < DAYS.length; d++) {
final int day = DAYS[i];
final CheckBox checkBox = (CheckBox) inflater.inflate(R.layout.zen_schedule_rule_day,
this, false);
}
});
mLayout.addView(checkBox);
+ i = ++i % DAYS.length;
}
}