Skip to content

Commit

Permalink
Modified refreshCalendar method name, now it's called update()
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatansalas committed Jan 20, 2017
1 parent 5db2477 commit 4b53815
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void prepareCalendarView() {
calendarView.setCurrentDay(new Date(System.currentTimeMillis()));
calendarView.setBackButtonColor(R.color.colorAccent);
calendarView.setNextButtonColor(R.color.colorAccent);
calendarView.refreshCalendar(Calendar.getInstance(Locale.getDefault()));
calendarView.update(Calendar.getInstance(Locale.getDefault()));
calendarView.setOnDateLongClickListener(selectedDate -> textView.setText(formatter.format(selectedDate)));
calendarView.setOnMonthChangeListener(monthDate -> {
final SimpleDateFormat df = new SimpleDateFormat("MMMM yyyy", Locale.getDefault());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ private void drawCalendar() {
isOverflowDateVisible = true;
currentMonthIndex = 0;

refreshCalendar(Calendar.getInstance(Locale.getDefault()));
update(Calendar.getInstance(Locale.getDefault()));
}

private void drawHeaderView() {
Expand All @@ -300,7 +300,7 @@ private void drawHeaderView() {
Calendar calendar = Calendar.getInstance(Locale.getDefault());
calendar.add(Calendar.MONTH, currentMonthIndex);

refreshCalendar(calendar);
update(calendar);

if (onMonthChangeListener != null) {
onMonthChangeListener.onMonthChange(calendar.getTime());
Expand All @@ -314,7 +314,7 @@ private void drawHeaderView() {
Calendar calendar = Calendar.getInstance(Locale.getDefault());
calendar.add(Calendar.MONTH, currentMonthIndex);

refreshCalendar(calendar);
update(calendar);

if (onMonthChangeListener != null) {
onMonthChangeListener.onMonthChange(calendar.getTime());
Expand Down Expand Up @@ -387,7 +387,7 @@ public void onDateSet(

calendar.add(Calendar.MONTH, currentMonthIndex);

refreshCalendar(calendar);
update(calendar);

if (onMonthChangeListener != null) {
onMonthChangeListener.onMonthChange(calendar.getTime());
Expand Down Expand Up @@ -595,7 +595,7 @@ private View getView(String key, Calendar currentCalendar) {
return view.findViewWithTag(key + index);
}

public void refreshCalendar(Calendar c) {
public void update(Calendar c) {
calendar = c;
calendar.setFirstDayOfWeek(firstDayOfWeek);

Expand Down Expand Up @@ -989,7 +989,7 @@ public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float ve
Calendar calendar = Calendar.getInstance(Locale.getDefault());
calendar.add(Calendar.MONTH, currentMonthIndex);

refreshCalendar(calendar);
update(calendar);

if (onMonthChangeListener != null) {
onMonthChangeListener.onMonthChange(calendar.getTime());
Expand All @@ -1003,7 +1003,7 @@ public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float ve
Calendar calendar = Calendar.getInstance(Locale.getDefault());
calendar.add(Calendar.MONTH, currentMonthIndex);

refreshCalendar(calendar);
update(calendar);

if (onMonthChangeListener != null) {
onMonthChangeListener.onMonthChange(calendar.getTime());
Expand Down

0 comments on commit 4b53815

Please sign in to comment.