I’m writing an app in which I use an activity called TestActivity that extends FragmentActivity.
In the onResume() of this TestActivity I will call a class which doesnot extend any Activity , its normal class. I need FragmentManager object in that class with which I will perform FragmentTransactions. What I need to send from FragmentActivity to that class to get reference FragmentManager.I tried sending the context which is getApplicationContext(), but not able to get the FragmentManger references . Can anyone help me in sorting out this issue ?
Thanks in Adavance
Each Activity has its own FragmentManager to manage the Fragments within it. You need to pass it the FragmentManager from the Activity that you wish to manipulate.
The Context that you seek is simply TextActivity.