private int measureHeight(){
  int dayOfWeek=calendar.get(Calendar.DAY_OF_WEEK);
  int daysOfMonth=daysOfCurrentMonth();
  int n=-1;
  if (dayOfWeek >= 2 && dayOfWeek <= 7) {
    n=daysOfMonth - (8 - dayOfWeek + 1);
  }
 else   if (dayOfWeek == 1) {
    n=daysOfMonth - 1;
  }
  int lines=2 + n / 7 + (n % 7 == 0 ? 0 : 1);
  return (int)(cellHeight * lines);
}

private int measureHeight ( ) { int dayOfWeek = calendar . get ( Calendar . DAY_OF_WEEK ) ; int daysOfMonth = daysOfCurrentMonth ( ) ; int n = - 1 ; if ( dayOfWeek >= 2 && dayOfWeek <= 7 ) { n = daysOfMonth - ( 8 - dayOfWeek + 1 ) ; } else if ( dayOfWeek == 1 ) { n = daysOfMonth - 1 ; } int lines = 2 + n / 7 + ( n % 7 == 0 ? 0 : 1 ) ; return ( int ) ( cellHeight * lines ) ; }
calculate the total height of the widget
