0

From my understanding, a TableLayout is a LinearLayout with vertical orientation and a TableRow is a LinearLayout with horizontal orientation.

Since the TableLayout's children are TableRows whose layout_width is enforced to MATCH_PARENT, I can only set the gravity of the TableLayout to either TOP or BOTTOM (which makes intuitive sense).

However, when I try to set the gravity of a TableRow to BOTTOM or TOP, it will not cause the TableRow's children (Views) to move to the bottom or top edge of the TableRow, respectively. I know for LinearLayout's, the gravity must be orthogonal/perpendicular to the orientation but if a TableRow is a horizontal LinearLayout, I don't understand why gravity set to BOTTOM or TOP does not satisfy that requirement.

Interestingly enough, I can set the TableRow's gravity to LEFT or RIGHT and it works ...

Any help or insight is greatly appreciated!

0 Answers0