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 android.os.Handler |
mHandler |
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) |
void |
onChange() |
void |
onDateChanged() |
void |
onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent event) |
void |
onInitializeAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo info)
Necessary for accessibility, to ensure we support "scrolling" forward and backward
in the month list.
|
protected void |
onLayout(boolean changed,
int l,
int t,
int r,
int b) |
boolean |
performAccessibilityAction(int action,
android.os.Bundle arguments)
When scroll forward/backward events are received, announce the newly scrolled-to month.
|
void |
postSetSelection(int position) |
protected void |
refreshAdapter()
Creates a new adapter if necessary and sets up its parameters.
|
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()
Sets all the required fields for the list view.
|
protected android.content.Context mContext
protected android.os.Handler mHandler
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)
public void setController(DatePickerController controller)
public void init(android.content.Context context)
protected void setUpRecyclerView()
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)
public void onInitializeAccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo info)
public boolean performAccessibilityAction(int action,
android.os.Bundle arguments)