https://kotlinlang.org logo
#codereview
Title
# codereview
t

trubesv

09/16/2017, 12:11 PM
Hey guys, I'm making this really simple app in order to learn Kotlin and its best practices: https://github.com/trubesv/Kotlist Please do correct me if I'm using things wrongly, and don't hesitate to show me how to write some parts better! K
k

karelpeeters

09/16/2017, 12:13 PM
In
MainActivity
you do
return (true)
,
return true
works just as well ☺️.
You actually do that a couple of times throughout your code, any reason for that​?
t

trubesv

09/16/2017, 12:25 PM
Hey, thanks for replying! That's a style habit I picked up when learning my first language, C 😛 Any reason why I should not do this? Does it have any side effect?
k

karelpeeters

09/16/2017, 12:25 PM
Nope, it doesn't matter at all, it's just not something you see in Kotlin. What does it do in C?
The rest of the code looks very clean, good job!
t

trubesv

09/16/2017, 12:31 PM
Thanks for the review! I tried to be as concise and clean as possible 🙂 Still a long way to go to implement empty list views using databinding, and converting XML to Anko DSL It does really nothing, I had to follow the school style guidelines for my projects (it was part of the grade somehow..)
Hello again @karelpeeters 🙂 I implemented the empty list views using databinding, aswell as a header keeping track of active items Am I doing this right or can it be improved? I hope you'll have some time to look at the code I pushed on the same repo 🙂 Thanks!
k

karelpeeters

10/05/2017, 7:09 AM
I really don't know anything about Android databinding, never used it.
7 Views