droid
09/08/2020, 2:53 PMif(Boolean.TRUE == someBooleanValue) { .. } else { .. }
, this example is using Boolean.TRUE
from Java and android studio is giving lint warning:Alex Prince
09/08/2020, 3:12 PMAlex Prince
09/08/2020, 3:12 PMsomebool == true
droid
09/08/2020, 6:32 PMBoolean.TRUE
is more like object comparison. Does somebool == true
do that?Zach Klippenstein (he/him) [MOD]
09/08/2020, 7:37 PMAlex Prince
09/08/2020, 7:38 PMdroid
09/08/2020, 8:21 PMZach Klippenstein (he/him) [MOD]
09/08/2020, 9:47 PMBoolean.TRUE
though? Kotlin will do the right thing if you just compare with true
.droid
09/09/2020, 12:25 AMlouiscad
09/10/2020, 1:06 PMByte
values are cached on Android.droid
09/11/2020, 3:01 PM