protected void drawWeeks ( ) { Calendar tmpCalendar = ( Calendar ) calendar . clone ( ) ; for ( int i = 1 ; i < 7 ; i ++ ) { tmpCalendar . set ( Calendar . DAY_OF_MONTH , ( i * 7 ) - 6 ) ; int week = tmpCalendar . get ( Calendar . WEEK_OF_YEAR ) ; String buttonText = Integer . toString ( week ) ; if ( week < 10 ) { buttonText = "0" + buttonText ; } weeks [ i ] . setText ( buttonText ) ; if ( ( i == 5 ) || ( i == 6 ) ) { weeks [ i ] . setVisible ( days [ i * 7 ] . isVisible ( ) ) ; } } }
Hides and shows the week buttons .