If you create Drawable objects on the fly you may have the unpleasant surprise that you introduced some memory leaks in your code. In that case, maybe you should unbind your drawables. This happens because when you display a Drawable object in your Activity, that Drawable instance will be bound (via some callbacks) to your … Continue reading Android Unbind Drawables
Tag: Kotlin
How to get Android resource ID by string
You may want to do this if you want to write a framework that relies on the name of the resources and not the actual ID, in order to remove references to the R class. For example if you use R.layout.activity_todo_list in your class, and you want to move your class in a separate library... … Continue reading How to get Android resource ID by string
Write less with Lombok
I'm not a fan of code generators,usually I simply hate them but lately, working with Project Lombok and especially writing Java code after a lot of Kotlin, I must confess I grown to tolerate this little library. People who hate Java, usually invoke its verbosity as on of the main reasons. Unfortunately, they are right, … Continue reading Write less with Lombok
Kotlin, after half a year
I started to learn Kotlin after Google's announced it as one of the official languages for the Android platform and in the heath of the moment I wrote my first impressions in this article. I thought that's it and never considered as a viable alternative for my production applications but I was wrong. Now after … Continue reading Kotlin, after half a year
Kotlin – first impressions
I just played a little bit with Kotlin, a fairly new programming language, that will be the default language for the Android platform. My first impression is good. It seems like a decent language with nice syntax but I won't use it for my personal projects in the near future. Of course if somebody pays … Continue reading Kotlin – first impressions