android.util
public
class
android.util.DayOfMonthCursor
Helps control and display a month view of a calendar that has a current
selected day.
- Keeps track of current month, day, year
- Keeps track of current cursor position (row, column)
- Provides methods to help display the calendar
- Provides methods to move the cursor up / down / left / right.
This should be used by anyone who presents a month view to users and wishes
to behave consistently with other widgets and apps; if we ever change our
mind about when to flip the month, we can change it here only.
Summary
Public Constructors
Public Methods
getColumnOf,
getDayAt,
getDigitsForRow,
getFirstDayOfMonth,
getMonth,
getNumberOfDaysInMonth,
getOffset,
getRowOf,
getWeekStartDay,
getYear,
isWithinCurrentMonth,
nextMonth,
previousMonth
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
public
DayOfMonthCursor(int year, int month, int dayOfMonth, int weekStartDay)
Parameters
| year
| The initial year. |
| month
| The initial month. |
| dayOfMonth
| The initial dayOfMonth. |
| weekStartDay
| What dayOfMonth of the week the week should start,
in terms of Calendar constants such as
SUNDAY.
|
Public Methods
public
boolean
down()
Move down one box, potentially flipping to the next month.
Returns
- Whether the month was flipped to the next month
due to the move.
public
int
getSelectedColumn()
public
int
getSelectedDayOfMonth()
public
int
getSelectedRow()
public
boolean
isSelected(int row, int column)
public
boolean
left()
Move left one box, potentially flipping to the previous month.
Returns
- Whether the month was flipped to the previous month
due to the move.
public
boolean
right()
Move right one box, potentially flipping to the next month.
Returns
- Whether the month was flipped to the next month
due to the move.
public
boolean
up()
Move up one box, potentially flipping to the previous month.
Returns
- Whether the month was flipped to the previous month
due to the move.