How to maintain screen orientation?

1

I would like to know the equivalent Java code for this command:

android:configChanges="orientation"

Justification: I'm creating an app with the NavigationDrawer Layout, and I need to make certain settings (or all screens) when the user rotates the device.

    
asked by anonymous 02.12.2014 / 12:56

1 answer

1

You can use the setRequestedOrientation (int requestedOrientation) in the onCreate method of Activity that uses the NavigationDrawer. For SetRequestedOrientation Information

Parameter Information

    
05.01.2015 / 14:14