Tower Guidev2
08/27/2025, 1:29 PMenum class FooterCell(val index: Int, val description: String) {
Left1(1, "Far left"),
Left2(2, "Second from left"),
Left3(3, "Third from left"),
Left4(4, "Fourth from left"),
Left5(5, "Fifth from left"),
Centre(6, "Middle / centre cell"),
Right5(7, "Fifth from right"),
Right4(8, "Fourth from right"),
Right3(9, "Third from right"),
Right2(10, "Second from right"),
Right1(11, "Far right");
companion object {
fun fromIndex(index: Int): FooterCell =
entries.firstOrNull { it.index == index }
?: throw IllegalArgumentException("Invalid cell index: $index")
}
}
Tgo1014
08/27/2025, 1:31 PMList<String>
and you display in the order of the List
?Tower Guidev2
08/27/2025, 1:32 PMTgo1014
08/27/2025, 1:35 PM.distinct()
on the list, no? It seems easier to pass a List than having to understand the 11 enums 😅Tower Guidev2
08/27/2025, 1:37 PM