If you're looking to use Kotlin to build a UI, I'd strongly recommend using
#compose over anything based on standard Views. Views were never designed to be created programmatically, and while a DSL might be able to make it work, it's almost certainly never going to be as easy or well-supported as XML. Compose, on the other hand, was designed from the very beginning to leverage the best features of Kotlin, and provide a much safer and easier way to build UIs in Kotlin code.
But if you're set on using a View-based DSL, the
Anko deprecation notice suggests
Splitties, which may be what you saw.