I would like to draw the shape like bellow. After some user event the program have to redraw it with different paramteres: the number and width of boxes were change. It represents busy and free time slots in a period.
The entire drawing will be in a view control. I know the pseudo-code only:
int left = 1;
int upper = 1;
int bottom = 50;
foreach( myDataType item : List<myDataType> ) {
Paint myPaint = new Paint();
myPaint.setColor( Color.RED );
Draw( left, upper, left + item.width, bottom, myPaint ); // red one
left += item.width;
myPaint.setColor( Color.GREEN );
Draw( left, upper, left + item.nextGap, bottom, myPaint ); // green one
left += item.nextGap;
}
Any ideas wellcome, thanx!