Is it safe (correct) to simply return from method's and do nothing if context is null? currently I'm doing this when ever I need context from fragment.
Context context = getContext();
if(context == null) return;
My question is too stupid and obvious but I'm still not sure if this is correct. if its necessary or not. (maybe I should log warnings?)
I do this check in onCreateView
, onViewCreated
, when getting context from itemView
in view holders and inside view click listeners when ever needed.