Android Fragment no view found for ID?

前端 未结 30 2532
逝去的感伤
逝去的感伤 2020-11-22 05:33

I have a fragment I am trying to add into a view.

FragmentManager fragMgr=getSupportFragmentManager();
feed_parser_activity content = (feed_parser_activity)f         


        
30条回答
  •  我在风中等你
    2020-11-22 06:13

    The solution was to use getChildFragmentManager()

    instead of getFragmentManager()

    when calling from a fragment. If you are calling the method from an activity, then use getFragmentManager().

    That will solve the problem.

提交回复
热议问题