public abstract class DayPickerView extends RecyclerView implements DatePickerDialog.OnDateChangedListener
| Modifier and Type | Class and Description |
|---|---|
static interface |
DayPickerView.OnPageListener |
| Modifier and Type | Field and Description |
|---|---|
protected MonthAdapter |
mAdapter |
protected android.content.Context |
mContext |
protected int |
mCurrentMonthDisplayed |
protected int |
mPreviousScrollState |
protected MonthAdapter.CalendarDay |
mSelectedDay |
protected MonthAdapter.CalendarDay |
mTempDay |
| Constructor and Description |
|---|
DayPickerView(android.content.Context context,
android.util.AttributeSet attrs) |
DayPickerView(android.content.Context context,
DatePickerController controller) |
| Modifier and Type | Method and Description |
|---|---|
abstract MonthAdapter |
createMonthAdapter(DatePickerController controller) |
int |
getCount() |
MonthView |
getMostVisibleMonth() |
int |
getMostVisiblePosition()
Gets the position of the view that is most prominently displayed within the list.
|
DayPickerView.OnPageListener |
getOnPageListener() |
boolean |
goTo(MonthAdapter.CalendarDay day,
boolean animate,
boolean setSelected,
boolean forceScroll)
This moves to the specified time in the view.
|
void |
init(android.content.Context context,
DatePickerDialog.ScrollOrientation scrollOrientation) |
void |
onChange() |
void |
onDateChanged()
This should only be called when the DayPickerView is visible, or when it has already been
requested to be visible
|
void |
onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent event) |
protected void |
onLayout(boolean changed,
int l,
int t,
int r,
int b) |
void |
postSetSelection(int position) |
protected void |
refreshAdapter()
Creates a new adapter if necessary and sets up its parameters.
|
protected void |
setController(DatePickerController controller) |
protected void |
setMonthDisplayed(MonthAdapter.CalendarDay date)
Sets the month displayed at the top of this view based on time.
|
void |
setOnPageListener(DayPickerView.OnPageListener pageListener) |
protected void |
setUpRecyclerView(DatePickerDialog.ScrollOrientation scrollOrientation)
Sets all the required fields for the list view.
|
protected android.content.Context mContext
protected MonthAdapter.CalendarDay mSelectedDay
protected MonthAdapter mAdapter
protected MonthAdapter.CalendarDay mTempDay
protected int mCurrentMonthDisplayed
protected int mPreviousScrollState
public DayPickerView(android.content.Context context,
android.util.AttributeSet attrs)
public DayPickerView(android.content.Context context,
DatePickerController controller)
protected void setController(DatePickerController controller)
public void init(android.content.Context context,
DatePickerDialog.ScrollOrientation scrollOrientation)
protected void setUpRecyclerView(DatePickerDialog.ScrollOrientation scrollOrientation)
public void onChange()
protected void onLayout(boolean changed,
int l,
int t,
int r,
int b)
protected void refreshAdapter()
public abstract MonthAdapter createMonthAdapter(DatePickerController controller)
public void setOnPageListener(DayPickerView.OnPageListener pageListener)
public DayPickerView.OnPageListener getOnPageListener()
public boolean goTo(MonthAdapter.CalendarDay day, boolean animate, boolean setSelected, boolean forceScroll)
day - The day to move toanimate - Whether to scroll to the given time or just redraw at the
new locationsetSelected - Whether to set the given time as selectedforceScroll - Whether to recenter even if the time is already
visiblepublic void postSetSelection(int position)
protected void setMonthDisplayed(MonthAdapter.CalendarDay date)
public int getMostVisiblePosition()
public MonthView getMostVisibleMonth()
public int getCount()
public void onDateChanged()
onDateChanged in interface DatePickerDialog.OnDateChangedListenerpublic void onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent event)