I\'m trying make an app that I\'m building take a search term from the main activity, return results, and then have the results be clickable such that a detail could be view
Let's try this out. I got the same problem and i fixed my problem using this code.
View root;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
if (root!= null) {
ViewGroup parent = (ViewGroup) root.getParent();
if (parent != null)
parent.removeView(root);
}
try {
root= inflater.inflate(R.layout.map_layout, container, false);
} catch (InflateException e) {
/* map is already there, just return view as it is */
}
return root;
}