Kotlin / anko

Pleasant Android application development
Apache License 2.0
15.89k stars 1.29k forks source link

ViewModels? #484

Open raveesh-me opened 7 years ago

raveesh-me commented 7 years ago

Hi! I am new to android development, yet have committed myself to kotlin/Anko pair. It seems that the development on the Anko side has slowed down a lot. I really love developing my UI in Anko. However, I don't know how to use Android ViewModels with Anko. Are there any examples? Is there a way that I can help?

Android Architecture components provide some much-needed abstractions. I mainly prefer Anko for its speedy layouts vs. inflating XML on runtime. Anko is definitely the future of Android development, but currently, it is competing with android architecture components in lots of ways (Anko SQLite vs ROOM) etc. I want to know the future of Anko and its place in android development. Currently, I want to leverage android ViewModels with Anko and I can't find an example. Any help?

nbnbbs commented 7 years ago

ViewModel contain data for your UI, what a problem to bind it to Anko view?

4u7 commented 6 years ago

@raveeshtech This may help you https://github.com/JetBrains/kotlinconf-app/tree/master/android

partounian commented 6 years ago

Came across this question while looking into Room vs Anko SQLite, would love to hear more about those modules, and the future of this project