I have an app that takes images from the android gallery, but on some devices the image orientation changes, I'd like to know how to keep the original orientation of the image.
I have an app that takes images from the android gallery, but on some devices the image orientation changes, I'd like to know how to keep the original orientation of the image.
When a new project is created, a file called AndroidManifest.xml is usually generated, in which you can configure the screen orientation of each created activity, among other settings. Basically what you need to do is put in each "activity "the android code: screenOrientation=" portrait ", which it leaves the screen in portrait mode. Here is an example code:
<activity
android:name=".Inicio"
android:label="@string/app_name"
android:screenOrientation="portrait">