public abstract class MonthAdapter extends android.widget.BaseAdapter 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 static int |
MONTHS_IN_YEAR |
protected static int |
WEEK_7_OVERHANG_HEIGHT |
Constructor and Description |
---|
MonthAdapter(android.content.Context context,
DatePickerController controller) |
Modifier and Type | Method and Description |
---|---|
abstract MonthView |
createMonthView(android.content.Context context) |
int |
getCount() |
java.lang.Object |
getItem(int position) |
long |
getItemId(int position) |
MonthAdapter.CalendarDay |
getSelectedDay() |
android.view.View |
getView(int position,
android.view.View convertView,
android.view.ViewGroup parent) |
boolean |
hasStableIds() |
protected void |
init()
Set up the gesture detector and selected time
|
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 static int WEEK_7_OVERHANG_HEIGHT
protected static final int MONTHS_IN_YEAR
public MonthAdapter(android.content.Context context, DatePickerController controller)
public void setSelectedDay(MonthAdapter.CalendarDay day)
day
- The day to highlightpublic MonthAdapter.CalendarDay getSelectedDay()
protected void init()
public int getCount()
getCount
in interface android.widget.Adapter
public java.lang.Object getItem(int position)
getItem
in interface android.widget.Adapter
public long getItemId(int position)
getItemId
in interface android.widget.Adapter
public boolean hasStableIds()
hasStableIds
in interface android.widget.Adapter
hasStableIds
in class android.widget.BaseAdapter
public android.view.View getView(int position, android.view.View convertView, android.view.ViewGroup parent)
getView
in interface android.widget.Adapter
public abstract MonthView createMonthView(android.content.Context context)
public void onDayClick(MonthView view, MonthAdapter.CalendarDay day)
onDayClick
in interface MonthView.OnDayClickListener
protected void onDayTapped(MonthAdapter.CalendarDay day)
day
- The day that was tapped