Fix conflicts

This commit is contained in:
androiddevkotlin 2021-03-06 22:46:35 +02:00
parent 802d063142
commit 80adbc698a

View file

@ -114,6 +114,7 @@ public class FlowLayout extends ViewGroup {
}
private int getFreeSizeSpacing(int width, LayoutParams lp, int childWidth) {
int freeSizeSpacing;
int itemsCount = width / (childWidth + lp.horizontalSpacing);
if (itemsCount > 1 && horizontalAutoSpacing) {
freeSizeSpacing = (width - childWidth) / (itemsCount-1);
@ -121,9 +122,8 @@ public class FlowLayout extends ViewGroup {
freeSizeSpacing = childWidth + lp.horizontalSpacing;
} else {
freeSizeSpacing = (width % childWidth / itemsCount);
return (width % childWidth / (itemsCount - 1)) + lp.horizontalSpacing;
}
return lp.horizontalSpacing;
return freeSizeSpacing;
}
public static class LayoutParams extends ViewGroup.LayoutParams {