3 ms·
If you find iOS / macOS views cumbersome to write programmatically you should feel fortunate you didn’t have to write Android views programmatically.
by julius_set 7y ago
If you find iOS / macOS views cumbersome to write programmatically you should feel fortunate you didn’t have to write Android views programmatically.
- lanjoe9 7y agoYou can always create a layout XML file and inflate it. It saves tons of time. I can't imagine why you would do thing in code instead of inflating and attaching them. Honestly, if not for SwiftUI, I find developing interfaces in Android to be infintely faster than either fighting Apple's Interface Builder or building things by code in Swift.
- myko 7y agoTrue but who does this? The Android framework isn't built to support that reasonably at all, at least not until Jetpack Compose becomes viable.
- Cthulhu_ 7y agoWasn't that the default way of doing things in Android? That is, build your ui's in XML?
- myko 7y agoBy writing views programmatically in Android they mean writing them in Kotlin or Java, not XML. Almost no one does this. Though Kotlin has an interesting looking DSL for doing that named Anko.