@@ -0,0 +1,1102 @@
+package anabalica.github.io.meowletters.customviews;%0A%0Aimport android.content.Context;%0Aimport android.util.AttributeSet;%0Aimport android.widget.TableRow;%0A%0A/**%0A * CustomTableRow is used to equally distribute N number of rows inside a%0A * SquareTableLayout, where N is SquareTableLayout custom attribute %60rowsCount%60.%0A * Since the height of the parent view is set dynamically, the weight has no%0A * effect on child elements of SquareTableLayout. The following is achieved by%0A * setting the height of the CustomTableRow to 1/rowsCount of its width.%0A *%0A * @author Ana Balica%0A */%0Apublic class CustomTableRow extends TableRow %7B%0A%0A    public CustomTableRow(Context context, AttributeSet attrs) %7B%0A        super(context, attrs);%0A    %7D%0A%0A    @Override%0A    public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) %7B%0A        super.onMeasure(widthMeasureSpec, heightMeasureSpec);%0A%0A        SquareTableLayout parent = (SquareTableLayout) getParent();%0A        final int rowsCount = parent.getRowsCount();%0A        final int width = getMeasuredWidth();%0A        setMeasuredDimension(width, width / rowsCount);%0A    %7D%0A%7D%0A

create CustomTableRow that takes into account rowsCount