Added in API level 1

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
MonthDisplayHelper(year: Int, month: Int, weekStartDay: Int)

MonthDisplayHelper(year: Int, month: Int)

Public methods
open Int

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

open IntArray!

open Int

open Int

open Int

open Int

open Int
getRowOf(day: Int)

open Int

open Int

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)
Parameters
year Int: The year.
month Int: The month.
weekStartDay Int: What day of the week the week should start.

MonthDisplayHelper

Added in API level 1
MonthDisplayHelper(
    year: Int,
    month: 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.

getMonth

Added in API level 1
open fun getMonth(): Int

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.

getRowOf

Added in API level 1
open fun getRowOf(day: Int): Int
Return
Int Which row day is in.

getWeekStartDay

Added in API level 1
open fun getWeekStartDay(): Int

getYear

Added in API level 1
open fun getYear(): Int

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.

nextMonth

Added in API level 1
open fun nextMonth(): Unit

Increment the month.

previousMonth

Added in API level 1
open fun previousMonth(): Unit

Decrement the month.