calendar position fix
This commit is contained in:
parent
b111111575
commit
53e6185295
|
|
@ -77,13 +77,16 @@ public abstract class CalendarAdapter<TDayViewHolder extends RecyclerView.ViewHo
|
|||
}
|
||||
|
||||
@Nullable
|
||||
public Integer getPositionToScroll(final boolean beginningOfSelection) {
|
||||
if (beginningOfSelection && startSelectionPosition != null) {
|
||||
public Integer getPositionToScroll(final boolean isDeparture) {
|
||||
if (isDeparture && startSelectionPosition != null) {
|
||||
return CalendarUtils.findPositionOfSelectedMonth(calendarItems, startSelectionPosition);
|
||||
}
|
||||
if (!beginningOfSelection && endSelectionPosition != null) {
|
||||
if (!isDeparture && endSelectionPosition != null) {
|
||||
return CalendarUtils.findPositionOfSelectedMonth(calendarItems, endSelectionPosition);
|
||||
}
|
||||
if (!isDeparture && startSelectionPosition != null) {
|
||||
return CalendarUtils.findPositionOfSelectedMonth(calendarItems, startSelectionPosition);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue