Fix conflicts
This commit is contained in:
parent
802d063142
commit
80adbc698a
1 changed files with 2 additions and 2 deletions
|
@ -114,6 +114,7 @@ public class FlowLayout extends ViewGroup {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getFreeSizeSpacing(int width, LayoutParams lp, int childWidth) {
|
private int getFreeSizeSpacing(int width, LayoutParams lp, int childWidth) {
|
||||||
|
int freeSizeSpacing;
|
||||||
int itemsCount = width / (childWidth + lp.horizontalSpacing);
|
int itemsCount = width / (childWidth + lp.horizontalSpacing);
|
||||||
if (itemsCount > 1 && horizontalAutoSpacing) {
|
if (itemsCount > 1 && horizontalAutoSpacing) {
|
||||||
freeSizeSpacing = (width - childWidth) / (itemsCount-1);
|
freeSizeSpacing = (width - childWidth) / (itemsCount-1);
|
||||||
|
@ -121,9 +122,8 @@ public class FlowLayout extends ViewGroup {
|
||||||
freeSizeSpacing = childWidth + lp.horizontalSpacing;
|
freeSizeSpacing = childWidth + lp.horizontalSpacing;
|
||||||
} else {
|
} else {
|
||||||
freeSizeSpacing = (width % childWidth / itemsCount);
|
freeSizeSpacing = (width % childWidth / itemsCount);
|
||||||
return (width % childWidth / (itemsCount - 1)) + lp.horizontalSpacing;
|
|
||||||
}
|
}
|
||||||
return lp.horizontalSpacing;
|
return freeSizeSpacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class LayoutParams extends ViewGroup.LayoutParams {
|
public static class LayoutParams extends ViewGroup.LayoutParams {
|
||||||
|
|
Loading…
Reference in a new issue