help me i use this sample example http://www.androidhub4you.com/2012/10/custom-calendar-in-android.html?showComment=1374298656772#c7739428050175524218 I want to print only current week of days. i want to display only single row. i modify this example code to my code. I replaced example code with this condition: if (i == currentWeekDay)
. But it only display first week of dates. Today's date is 20 july. Is does not show today date of week. My screen looks like this:
how i display current week only??
// Current Month Days
for (int i = 1; i <= daysInMonth; i++) {
Log.d(currentMonthName, String.valueOf(i) + " "
+ getMonthAsString(currentMonth) + " " + yy);
if (i == getCurrentDayOfMonth()) {
list.add(String.valueOf(i) + "-BLUE" + "-"
+ getMonthAsString(currentMonth) + "-" + yy);
} else {
list.add(String.valueOf(i) + "-WHITE" + "-"
+ getMonthAsString(currentMonth) + "-" + yy);
}
}
// Current Month Days
for (int i = 1; i <= daysInMonth; i++) {
Log.d(currentMonthName, String.valueOf(i) + " "
+ getMonthAsString(currentMonth) + " " +
yy);
if (i == currentWeekDay)
{
if (i == getCurrentDayOfMonth()) {
list.add(String.valueOf(i) + "-BLUE" + "-"
+ getMonthAsString(currentMonth)
+ "-" + yy);
} else {
list.add(String.valueOf(i) + "-WHITE" + "-"
+ getMonthAsString(currentMonth) +
"-" + yy);
}
}
}