I have set up an app to use the master/detail pattern, i.e. showing a listview and details about the selected item at the same time in landscape mode, and only the listview + start new activity for detail view in portrait mode.
Everything seemed to work perfectly, until I got a NullPointerException when trying to use getActivity() within my Master-fragment after I had changed orientation to landscape mode. Strange thing is, it works in portrait mode both before and after I change orientation (and change back to portrait)!
I'm calling getActivity() when the user presses a button, so it's definitely after the activity has been created, and getActivity should not return null, right?
0 comments:
Post a Comment