android - My code does not show days after today -


i want display current week values in calendar. using example code:

custom calendar in android | android calendar example full source code

and editing few lines single row shows current week dates.

the result looks this:

calendar

... code shows today's date, , not show date of tomorrow or day after tomorrow. do?

i want this:

   sun mon tues  wednes thurs fri sat    21  22   23    24     25    26  27 

but code shows:

  sun mon tues  wednes thurs fri sat    21  22   1    2      3     4  5 

i changed code example code:

 // current month days   (int = 1; <= 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);      }   } 

with code:

 // current month days  int startdate = 0;  (int = 1; <= daysinmonth; i++) {     log.d(currentmonthname, string.valueof(i) + " "             + getmonthasstring(currentmonth) + " " + yy);      startdate=getcurrentdayofmonth()-(list.size() % 7);         system.out.println("**********"+startdate);        if (i == getcurrentdayofmonth()) {          list.add(string.valueof(i) + "-blue" + "-"                 + getmonthasstring(currentmonth) + "-" + yy);          break;     } else {           list.add(string.valueof(i) + "-white" + "-"                 + getmonthasstring(currentmonth) + "-" + yy);     } }  //removing itmem fro list system.out.println("----------------------"+startdate); system.out.println(list.size()); for(int k=1;k<=startdate;k++){     system.out.println("item remove"+k);     list.remove(0); } 

if (i == getcurrentdayofmonth()) {          list.add(string.valueof(i) + "-blue" + "-"                 + getmonthasstring(currentmonth) + "-" + yy);          break;     } 

in there, remove break. hit "today" break out of loop.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -