Sent from my HTC

----- Reply message -----
From: "Live Happy" <[email protected]>
To: <[email protected]>
Subject: [android-developers] Re: Fragment transaction between 2 
FragmentActivity
Date: Sat, Nov 24, 2012 4:34 am
this is the error i got wish that someone can help with it 
11-24 07:09:48.269: E/AndroidRuntime(19294): java.lang.IllegalStateException: 
Can not perform this action after onSaveInstanceState
11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1314)

11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1325)
11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:548)

11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:532)
11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
com.example.side_navigation.MainActivity.onSelected(MainActivity.java:79)

11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
com.example.side_navigation.MenuFragment.onListItemClick(MenuFragment.java:77)
11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
android.support.v4.app.ListFragment$2.onItemClick(ListFragment.java:58)

11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
android.widget.AdapterView.performItemClick(AdapterView.java:284)
11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
android.widget.ListView.performItemClick(ListView.java:3763)

11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
android.widget.AbsListView$PerformClick.run(AbsListView.java:1918)
11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
android.os.Handler.handleCallback(Handler.java:587)

11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
android.os.Handler.dispatchMessage(Handler.java:92)
11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
android.os.Looper.loop(Looper.java:123)
11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
android.app.ActivityThread.main(ActivityThread.java:3687)

11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
java.lang.reflect.Method.invokeNative(Native Method)
11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
java.lang.reflect.Method.invoke(Method.java:507)
11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)

11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
11-24 07:09:48.269: E/AndroidRuntime(19294):     at 
dalvik.system.NativeStart.main(Native Method)



On Fri, Nov 23, 2012 at 1:46 PM, Live Happy <[email protected]> wrote:


i implement side navigation in my code and i used this librairy

https://github.com/korovyansk/android-fb-like-slideout-navigation

the list side extends FragmentActivity and the Main side extends 
FragmentActivity (see picture). 


when i click in item of the list i want the main fragment replaced by another 
fragment 

so it there a way to  do transaction  fragment in the Main 
FragmentActivity  from the list FragmentActivity  what i can add to this
code  to make the transaction in Main not in List

FragmentTransaction ft 
=getActivity().getSupportFragmentManager().beginTransaction();
ft.replace(R.id.fragment, newFragment);
ft.addToBackStack(null);
ft.commit();







-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to