Jinal Barot
07/15/2019, 6:42 AMgildor
07/15/2019, 6:44 AMquery
method signature, it annotated with @Nullable
Just check for cursor nullability in your condition and Kotlin smart cast will handle it for you:
if (cursor != null && cursor.count > 0)
var
, you can see that IDE suggest you to use val
, it will also help with smart cast in some casesLou Morda
08/13/2019, 5:01 PM