Screen rotation
Most, if not all, mobile devices allow for screen reorientation. Many apps, such as video players, are better suited to one orientation than another. Generally speaking, we want our apps to look their best, however rotated.
Most layouts look terrible when translated from portrait to landscape or vice versa. Clearly, we need to create alternatives for these situations. Fortunately, we do not have to start from scratch. The best way to see how this is done is to start with a standard portrait layout like the one here:
This can be recreated with the following code:
<android.support.percent.PercentRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" ...
Get Android Design Patterns and Best Practice now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.