XML : Changing UI when in portrait and landscape

I understand there are already questions here on using orientation and landscape layouts however what I want to do is a bit different. I am aiming to change the UI entirely when rotated to landscape e.g when portrait it displays regular information but when rotated shows a table.

Would this involve having two separate activities and using an if statement to start the activity depending on orientation? I have tried using a simple landscape layout but when I change the orientation it closes on a nullpointerexception for all the findviewbyids for items used in the portrait layout.

No comments:

Post a Comment