I think something like this could be “not bad”: `...
# anko
y
I think something like this could be “not bad”:
Copy code
abstract class Ids(val initial: Int = 1) {
    private val current = AtomicInteger(initial)
    fun generateId() = current.getAndIncrement()
}

object MyComponentIds : Ids() {
    val LIST_ID = generateId()
    val NAME_ID = generateId()
}