English | Site Directory

Android - An Open Handset Alliance Project

android.util
public class

android.util.DayOfMonthCursor

java.lang.Object
android.util.MonthDisplayHelper
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

          DayOfMonthCursor(int year, int month, int dayOfMonth, int weekStartDay)

Public Methods

        boolean  down()
Move down one box, potentially flipping to the next month.
        int  getSelectedColumn()
        int  getSelectedDayOfMonth()
        int  getSelectedRow()
        boolean  isSelected(int row, int column)
        boolean  left()
Move left one box, potentially flipping to the previous month.
        boolean  right()
Move right one box, potentially flipping to the next month.
        boolean  up()
Move up one box, potentially flipping to the previous month.
Methods inherited from class android.util.MonthDisplayHelper
Methods inherited from class java.lang.Object

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.
Build m5-rc15i - 10 Jun 2008 13:54