This is a keypad used in handyCalc:It is make up with MyGridLayout. It's divided into a 5x5 grid and layout each button on it.Of course you can make it with other layouts like LinearLayout or RelativeLayout. but the measure method costs too much time and the I use some LinearLayout to combine a keypad like that and it delay the UI for about 3 seconds on my poor DELL D600 laptop which is not acceptable.

With a MyGridLayout, you can divide it to 100x100 and use your widgets as a 100% percentage.

Pardon my ignorance, but why is this method better than a table layout?Looks like your layout would require 2 table layouts since you have a button that spans multiple rows but still...Is the performance really that bad for a table layout?

GodsMoon wrote:Pardon my ignorance, but why is this method better than a table layout?Looks like your layout would require 2 table layouts since you have a button that spans multiple rows but still...Is the performance really that bad for a table layout?

TableLayout can span multiply columns but cannot span rows. it can let it's child view to decide how big a row or a colunm will take but a GridLayout cannot.

GridLayout's child view doesn't measure itself since it gives each child a explicit position according to the layout params.

They are used in different cases. But if you say you can use 2 table layouts to make that layout, i'll say why don't you try a AbsoluteLayout?