I wonder if these two methods leads to same results or one is better to use than the other.
if(isAdded()){
//do something with activity since fragment is currently added to its activity.
}
And
if(null != getActivity()){
//do something with activity. Its not null
}