My fragment class is
public class GetFragmentManager extends FragmentActivity {
public FragmentManager getSupportFragmentMethod(){
FragmentManager s = getSupportFragmentManager();
return s;
}
}
I needed the getSupportFragmentManager
method(which i can get from the FragmentActivity class) so i made this class which extends the FragmentActivity
class.
My Activity code(this extends the Activity class) is
public void showFileChooser(View v){
DialogFragment a =new FireMissilesDialogFragment();
a.show(getSupportFragmentManager1(), "missiles");
}
private android.support.v4.app.FragmentManager getSupportFragmentManager1() {
android.support.v4.app.FragmentManager ab = new GetFragmentManager().getSupportFragmentMethod();
return ab;
}
The error statement coming is Activity is being destroyed.
Please can anyone find what is going wrong in here.I have spend many hours on this.Thanks everyone for your time.