I saw a few days ago a library to construct Android UI with Kotlin, maybe a DSL. Like Anko, but newer and supported. Maybe it was from Square? I canโt find it now. Anybody here know what it might be. Thank you!
c
Casey Brooks
02/01/2022, 8:39 PM
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.