Hey guys, I’m working on a solution for building l...
# android
Hey guys, I’m working on a solution for building layouts using pure Kotlin. It’s more of a research kind of thing at the moment so bare with me. Here’s a quick demo, link to the repo in the video description. Let me know your thoughts!


👏 5
👍 3
😮 2
This really looks amazing, may i know if you’re using a dex compiler inside the app for running your latest kotlin code, to update the application using kotlin DSL on the fly.
Thanks! I first tried to use a dex compiler but ran into too many issues which is way I created this layout system. It’s really easy to serialise so I’ve created a small web server that runs on the emulator and receives layouts using JSON
😮 1
Well that was kinda awesome!
❤️ 1
What is the problem that you're trying to solve, btw? Hot reload? One adjacent application would be server driven ui (quite hot topic in apps that need to scale: Lyft, Spotify, Airbnb). But for that you'd need to distantiate from android layouts and move towards some cross-platform ui representation. Even further, maybe one day you'll be able to send a flex-box layout and it will be rendered natively on all platforms.
It’s not real hot-reload, only the layout is serialised and sent to the device. I’m still trying to figure out what’s the best problem to solve with it. I’ve kind of made it for fun so far to be honest… But it could do a lot: live layout updates from a server, an easier way of achieving transitions in Android, 100% Kotlin based layout, etc. Also, the layout system itself and the transition API are purely written in Kotlin, the Android plug is only 2 files so I can easily port that to Javascript and I probably will. Regarding iOS, a friend of mine actually made something really similar