当前位置: 动力学知识库 > 问答 > 编程问答 >

java - beginTransaction(); not recognized in intellIj 4.0.3

问题描述:

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();

...

分享给朋友:
您可能感兴趣的文章:
随机阅读: