I want to run the application in portrait mode, I know that this is not the best practice, but there are reasons for this. and while I turned off the rotation, it can still rotate in some views, whether it will be different.
I have this piece of code in Android Manifest:
<activity android:name="<name>.app.MainActivity" android:label="@string/app_name" android:configChanges="keyboardHidden|keyboard|locale|orientation" android:screenOrientation="portrait">
I use fragments to display different containers depending on user input.
This is the only action in which there are fragments. I tried several solutions on this site. including setting portrait mode by code
source share