Friday, February 16, 2018

Tip: Use lambdas

The reason is that lambda does not hold strong reference and will not cause memory leak.
To use lambda just add following block :
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
inside android {...} block of app level of your build.gradle file

No comments:

Post a Comment