我会说使用Java“GrigoRangalAldar”类:
http://developer.android.com/reference/java/util/GregorianCalendar.html
我编写了一个简单的Java程序来演示如何填充它:
//calendar for November 1986
GregorianCalendar gCal = new GregorianCalendar(1986, Calendar.NOVEMBER, 1);
//this gets the day of week range 1-7, Sunday - Saturday
int currentDay = gCal.get(Calendar.DAY_OF_WEEK);
//backtracks to the beginning of current week (Sunday)
gCal.add(Calendar.DAY_OF_YEAR, Calendar.SUNDAY - currentDay);
int gridSizeX = 7, gridSizeY = 6;
for (int i = 0; i < gridSizeY; i++)
{
for (int j = 0; j < gridSizeX; j++)
{
//fill in your cell with this value
System.out.print(gCal.get(Calendar.DAY_OF_MONTH));
System.out.print(" ");
//add one to the day and keep going
gCal.add(Calendar.DAY_OF_YEAR, 1);
}
System.out.println();
}