Hello. There is a problem, which consists in limiting the position of the image on the screen. Specifically, it is necessary for the application on the tablet / phablet devices to work in landscape mode, and on all others - in portrait mode. How can this be implemented? Thank you in advance for your response.

1 answer 1

In resources for different screen sizes, you can create a file to store boolean variables, and to store false for a smartphone, and true for tablets. Next, in the activation call the setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); method setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); checking before this value and file. Good example here