January 2018
Intermediate to advanced
434 pages
14h 1m
English
It is strongly recommended that you don’t use enums in your Android projects. According to Google engineers, adding a single enum will increase the size to approximately 13 times that of the final DEX file. It also generates the problem of runtime overhead and your app will require more space.
The Android documentation says this:
However, if you want the comfort of enums, you can use Android’s annotation library, which has TypeDef annotations—but sadly, this isn’t supported by Kotlin at the time of this book being written, so we hope it gets added in future versions of Kotlin.
Read now
Unlock full access