问题描述:

I'm just trying to create a simple single fragment. I'm using intellij as my IDE. When I call beginTransaction(), the code isn't resolved and asks me to create a class with beginTransaction extended.

...

 FragmentManager fragmentManager = getFragmentManager();

FragmentTransaction fragmentTransaction = new fragmentManager.beginTransaction();

TestFrag testFrag = new TestFrag();

fragmentTransaction.add(R.id.testFrag, testFrag);

fragmentTransaction.commit();

...

相关阅读:
Top