public static void alignWidths(final ButtonToggleGroup... groups) {
        //get max widths
        final List<Integer> maxWidths = new ArrayList<>();
        int pos = 0;
        while (true) {
            int foundCnt = 0;
            int maxWidth = 0;
            for (ButtonToggleGroup group : groups) {
                if (pos < group.getChildCount()) {
                    final Button child = (Button) group.getChildAt(pos);
                    child.measure(0, 0);
                    maxWidth = Math.max(maxWidth, child.getMeasuredWidth());
                    foundCnt++;
                }
            }
            if (foundCnt < 1) {
                break;
            }
            maxWidths.add(maxWidth);
            pos++;
        }

        //now apply found maxwidths to each element
        for (ButtonToggleGroup group : groups) {
            group.setMinWidths(maxWidths);
        }

    }
Aligns the widths of the buttons of given ButtonToggleGroups so they match
main/src/main/java/cgeo/geocaching/ui/ButtonToggleGroup.java