Rotating Crashes app


I was doing the challenge and noticed that if you rotate on the screen where you would put in information about the crime and if you pretty much try to do anything in landscape except toggle the subtitle, it will crash.

The Stack trace says there is a null pointer exception because of the way I update my time. I should note that I only did the easy challenge in Ch. 12 so I have a button to update the date and time separately.

Has anyone had a problem similar to this?

I took out the TimePickerButton and now it will change so it must be something with that.

It appears that the only problem was that I didn’t have a TimePickerButton on the layout xml file. So now it is working like normal