mirror of
https://github.com/gabehf/tempus.git
synced 2026-03-11 00:10:35 -07:00
Fix artist cover visualization
This commit is contained in:
parent
80f30aa41a
commit
c55f639368
21 changed files with 157 additions and 334 deletions
14
app/src/main/java/com/cappielloantonio/play/util/UIUtil.java
Normal file
14
app/src/main/java/com/cappielloantonio/play/util/UIUtil.java
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue