androidandroid-layoutandroid-orientation

What is layout-square orientation in Android?


The Android system uses the default layout directory whether the user is using the application in a portrait or landscape mode, but we can customize our application to use a specific design when the user is in the landscape mode by using the layout-land directory, so what about the layout-square directory as I didn't find any resource explaining it.

Creating new resource directory using the layout-square directory


Solution

  • In theory, it is possible to create a device with a screen that has the same dimensions on both axes: a square screen. Such a device would not really have "portrait" and "landscape".

    The -square resource set qualifier would be used for resources optimized for that form factor.

    Since ~0% of Android devices have square screens, I estimate that ~0% of Android apps have -square resources.