I thought I had understood that you're supposed to call FragmentTransaction.add() in onCreate() and FragmentTransaction.remove() in onDestroy(). My app crashes in onDestroy() with this error:
06-26 15:25:50.213: E/AndroidRuntime(579): java.lang.RuntimeException: Unable to destroy activity {com.myapp/com.myapp.MainActivity}: java.lang.IllegalStateException: Activity has been destroyed
When do I call these things if not in onCreate/onDestroy()?