Handles screen orientation in MainFragment