SyntaxFix
Write A Post
Hire A Developer
Questions
Another solution:
if (view == null) { view = inflater.inflate(R.layout.nearbyplaces, container, false); }
That's it, if not null you don't need to reinitialize it removing from parent is unnecessary step.