public abstract class MonthAdapter extends <any> implements MonthView.OnDayClickListener
MonthView items.| Modifier and Type | Class and Description |
|---|---|
static class |
MonthAdapter.CalendarDay
A convenience class to represent a specific date.
|
| Modifier and Type | Field and Description |
|---|---|
protected DatePickerController |
mController |
protected static int |
MONTHS_IN_YEAR |
protected static int |
WEEK_7_OVERHANG_HEIGHT |
| Constructor and Description |
|---|
MonthAdapter(DatePickerController controller) |
| Modifier and Type | Method and Description |
|---|---|
abstract MonthView |
createMonthView(android.content.Context context) |
int |
getItemCount() |
long |
getItemId(int position) |
MonthAdapter.CalendarDay |
getSelectedDay() |
protected void |
init()
Set up the gesture detector and selected time
|
void |
onBindViewHolder(com.wdullaer.materialdatetimepicker.date.MonthAdapter.MonthViewHolder holder,
int position) |
com.wdullaer.materialdatetimepicker.date.MonthAdapter.MonthViewHolder |
onCreateViewHolder(android.view.ViewGroup parent,
int viewType) |
void |
onDayClick(MonthView view,
MonthAdapter.CalendarDay day) |
protected void |
onDayTapped(MonthAdapter.CalendarDay day)
Maintains the same hour/min/sec but moves the day to the tapped day.
|
void |
setSelectedDay(MonthAdapter.CalendarDay day)
Updates the selected day and related parameters.
|
protected final DatePickerController mController
protected static int WEEK_7_OVERHANG_HEIGHT
protected static final int MONTHS_IN_YEAR
public MonthAdapter(DatePickerController controller)
public void setSelectedDay(MonthAdapter.CalendarDay day)
day - The day to highlightpublic MonthAdapter.CalendarDay getSelectedDay()
protected void init()
public com.wdullaer.materialdatetimepicker.date.MonthAdapter.MonthViewHolder onCreateViewHolder(android.view.ViewGroup parent,
int viewType)
public void onBindViewHolder(com.wdullaer.materialdatetimepicker.date.MonthAdapter.MonthViewHolder holder,
int position)
public long getItemId(int position)
public int getItemCount()
public abstract MonthView createMonthView(android.content.Context context)
public void onDayClick(MonthView view, MonthAdapter.CalendarDay day)
onDayClick in interface MonthView.OnDayClickListenerprotected void onDayTapped(MonthAdapter.CalendarDay day)
day - The day that was tapped