FragmentMap + ActionBar Tab

后端 未结 4 1390
忘了有多久
忘了有多久 2021-02-10 07:47

I\'ve been trying insert a MapView into an ActionBar Tab, but I wasn\'t able to solve the problem even googling.

Here is the Main

4条回答
  •  無奈伤痛
    2021-02-10 08:30

    I've solved this issue changing the onCreateView method:

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        if (view == null) {
            view = inflater.inflate(R.layout.fragment_geo, container, false);
        }
        return view;
    }
    

    where view is a View object.

提交回复
热议问题