I need to determine the reverse orientation of the terrain so that the user does not start to capture vertical videos.
I implemented 2 layouts in the layout-land and layout-port folders with a different set of controls. The problem is that Android does not allow me to create a separate layout specifically for the reverse landscape. I need this because the video is recorded upside down in this case, although the user interface is displayed correctly.
If I rotate the device from 0 to 180, then Android does not even call onCreate() my activity, but in this case the video is flipped.
Can anyone suggest a working example on how to determine a specific orientation of the device (reverse landscape in my case) so that I can use a different layout for this orientation?
source share