Android Fragment no view found for ID?

前端 未结 30 1995
逝去的感伤
逝去的感伤 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:09

    My mistake was on the FragamentTransaction.

    I was doing this t.replace(R.layout.mylayout); instead of t.replace(R.id.mylayout);

    The difference is that one is the layout and the other is a reference to the layout(id)

提交回复
热议问题