I have a class (shown below) which extends Fragment. Now i need my class to return a view to the Other class when i create an object. Everything is working fine but i need this class to do the stuff in a background thread. I also used ASYNC task but i couldn't make an ASYNC task to return a view. can anyone help.??
MapFragment.java
public class MapsFragment extends Fragment
{
MapView map;
LayoutInflater inflater_;
ViewGroup container_;
View layout;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
inflater_=inflater;
container_=container;
super.onCreate(savedInstanceState);
layout = inflater.inflate(R.layout.fragment_maps, container, false);
map = (MapView) layout.findViewById(R.id.mapView);
return (LinearLayout) layout;
}
}