03-04-2011 10:08 AM
Alright so I've got a new project of which there will be a lot of "cells" (which means there will be bordered content cells of which cover the page (over 100)...Now I'm wondering what do you guys think would be best for the borders of these cells?
My options are to draw a ton of rectangles (drawRect), and lines etc... (probably 20 or so)
Or to do it as a background sort of image, and just overlay that with my cells and their clickable content, etc...
03-04-2011 10:30 AM
If you don't need to have multiple colors on the border (ie to indicate a selected cell for instance) then allowing the backgroun to 'show through' the spaces between the cells is a fine approach. It also works well when considing an orientation change.
It can work too if the background were some sort of pre-generated nicely drawn image file as well, but getting the alignment set just right can be a very iterative and time-consuming process. Also, changing orientation may be more complicated as well.
On thing I've done is to generate a background (using graphics drawing commands, but it doesn't matter really) thats 1024x1024. This way the background doesn't need to be redrawn or altered when the device changes orientation. If you can design your cell sizes and placement just right, you might be able to do something similar.
03-04-2011 11:12 AM
03-04-2011 11:30 AM
How about using a list and laying it out using the tile layout.. In the item renderer of the list you can draw the cells borders.
Check out this..
That uses images for the items but obviously you can change it to what ever you want.