Preparation for resize and orientation changes.