Added in API level 1
MonthDisplayHelper
open class MonthDisplayHelper
Helps answer common questions that come up when displaying a month in a 6 row calendar grid format. Not thread safe.
Summary
Public constructors | |
---|---|
MonthDisplayHelper(year: Int, month: Int) |
|
MonthDisplayHelper(year: Int, month: Int, weekStartDay: Int) |
Public methods | |
---|---|
open Int |
getColumnOf(day: Int) |
open Int | |
open IntArray! |
getDigitsForRow(row: Int) |
open Int | |
open Int |
getMonth() |
open Int | |
open Int | |
open Int | |
open Int | |
open Int |
getYear() |
open Boolean |
isWithinCurrentMonth(row: Int, column: Int) |
open Unit |
Increment the month. |
open Unit |
Decrement the month. |
Public constructors
MonthDisplayHelper
Added in API level 1
MonthDisplayHelper(
year: Int,
month: Int,
weekStartDay: Int)
Public methods
getColumnOf
Added in API level 1
open fun getColumnOf(day: Int): Int
Return | |
---|---|
Int |
Which column day is in. |
getDayAt
Added in API level 1
open fun getDayAt(
row: Int,
column: Int
): Int
Parameters | |
---|---|
row |
Int: The row, 0-5, starting from the top. |
column |
Int: The column, 0-6, starting from the left. |
Return | |
---|---|
Int |
The day at a particular row, column |
getDigitsForRow
Added in API level 1
open fun getDigitsForRow(row: Int): IntArray!
Parameters | |
---|---|
row |
Int: Which row (0-5). |
Return | |
---|---|
IntArray! |
the digits of the month to display in one of the 6 rows of a calendar month display. |
getFirstDayOfMonth
Added in API level 1
open fun getFirstDayOfMonth(): Int
Return | |
---|---|
Int |
The first day of the month using a constants such as java.util.Calendar#SUNDAY . |
getNumberOfDaysInMonth
Added in API level 1
open fun getNumberOfDaysInMonth(): Int
Return | |
---|---|
Int |
The number of days in the month. |
getOffset
Added in API level 1
open fun getOffset(): Int
Return | |
---|---|
Int |
The offset from displaying everything starting on the very first box. For example, if the calendar is set to display the first day of the week as Sunday, and the month starts on a Wednesday, the offset is 3. |
isWithinCurrentMonth
Added in API level 1
open fun isWithinCurrentMonth(
row: Int,
column: Int
): Boolean
Return | |
---|---|
Boolean |
Whether the row and column fall within the month. |