MonthDisplayHelper

open class MonthDisplayHelper
kotlin.Any
   ↳ android.util.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
<init>(year: Int, month: Int, weekStartDay: Int)

<init>(year: Int, month: Int)

Public methods
open Boolean
isWithinCurrentMonth(row: Int, column: Int)

open Int
getDayAt(row: Int, column: Int)

open Unit

Decrement the month.

open IntArray!

open Unit

Increment the month.

open Int

open Int

open Int

open Int

open Int
getRowOf(day: Int)

open Int

open Int

open Int

Public constructors

<init>

MonthDisplayHelper(year: Int, month: Int, weekStartDay: Int)
Parameters
year Int: The year.
month Int: The month.
weekStartDay Int: What day of the week the week should start.

<init>

MonthDisplayHelper(year: Int, month: Int)

Public methods

isWithinCurrentMonth

open fun isWithinCurrentMonth(row: Int, column: Int): Boolean
Return
Boolean: Whether the row and column fall within the month.

getDayAt

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

previousMonth

open fun previousMonth(): Unit

Decrement the month.

getDigitsForRow

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.

nextMonth

open fun nextMonth(): Unit

Increment the month.

getMonth

open fun getMonth(): Int

getFirstDayOfMonth

open fun getFirstDayOfMonth(): Int
Return
Int: The first day of the month using a constants such as java.util.Calendar#SUNDAY.

getOffset

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.

getNumberOfDaysInMonth

open fun getNumberOfDaysInMonth(): Int
Return
Int: The number of days in the month.

getRowOf

open fun getRowOf(day: Int): Int
Return
Int: Which row day is in.

getWeekStartDay

open fun getWeekStartDay(): Int

getYear

open fun getYear(): Int

getColumnOf

open fun getColumnOf(day: Int): Int
Return
Int: Which column day is in.