Fix artist cover visualization

This commit is contained in:
CappielloAntonio 2021-07-29 14:19:19 +02:00
parent 80f30aa41a
commit c55f639368
21 changed files with 157 additions and 334 deletions

View file

@ -0,0 +1,14 @@
package com.cappielloantonio.play.util;
public class UIUtil {
public static int getSpanCount(int itemCount, int maxSpan) {
int itemSize = itemCount == 0 ? 1 : itemCount;
if (itemSize / maxSpan > 0) {
return maxSpan;
}
else {
return itemSize % maxSpan;
}
}
}