android:configChanges=”orientation” does not work with fragments

Based on my experience with Honeycomb 3.0 and compatibility library (r1).

configChange="orientation" does work with fragments with respect to preventing the activity (to which it is applied) being re-created on an orientation change. If you want the fragment not to be re-created on activity re-creation then call setRetainInstance in onCreate.

Unless I’m missing something I don’t quite get your second manifest entry, isn’t AppListFragment a Fragment? If so then why is it listed as an entry in your manifest?

See SO Answer for new qualifiers which is likely to be causing this if you are targetting sdk 13, suggest trying android:configChanges="orientation|screenSize"

Leave a Comment