Fixes some odd spacing in right-to-left direction and sets some icons to auto-mirror.
This commit is contained in:
parent
e4dff388d2
commit
b77d9934ab
6 changed files with 15 additions and 12 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue