我在我的应用程序中使用谷歌地图 v2,但是当我尝试SupportMapFragment
使用onActivityCreated()
这种方法创建一个对象时没有被调用有人请帮助我这是我的代码,
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
Log.d("err", "onCreateView");
view = inflater
.inflate(R.layout.todays_deal_location, container, false);
mFragment = new SupportMapFragment() {
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
Log.d("err", "onActivityCreated");
GoogleMap map = mFragment.getMap();
}
};
return view;
}