Fixes some odd spacing in right-to-left direction and sets some icons to auto-mirror.

This commit is contained in:
Vavassor 2017-07-12 17:03:32 -04:00
commit b77d9934ab
6 changed files with 15 additions and 12 deletions

View file

@ -64,16 +64,17 @@ public class FlowLayout extends ViewGroup {
if (child.getVisibility() != GONE) {
int widthSpec = MeasureSpec.makeMeasureSpec(width, MeasureSpec.AT_MOST);
child.measure(widthSpec, childHeightMeasureSpec);
int childwidth = child.getMeasuredWidth();
child.getLayoutParams();
int childWidth = child.getMeasuredWidth();
int childHeight = child.getMeasuredHeight();
if (x + childwidth > width) {
if (x + childWidth > width) {
x = getPaddingLeft();
y += rowHeight;
rowHeight = childHeight + paddingVertical;
} else {
rowHeight = Math.max(rowHeight, childHeight + paddingVertical);
}
x += childwidth + paddingHorizontal;
x += childWidth + paddingHorizontal;
}
}
if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.UNSPECIFIED) {