Reputation: 29
Portrait mode is working and landscape is not showing.
android:screenOrientation="portrait" // Here i need to show both portrait and landscape.
Upvotes: 1
Views: 2499
Reputation: 462
You can use:
android:screenOrientation="unspecified"
This is the default value and the system chooses the orientation.
alternatively, you can use:
android:screenOrientation="fullSensor"
In this case, device orientation sensor determinates the screen orientation.
Try one and the other to see which one works best for you.
EDIT: For a specific class, you can do this:
<activity
android:name=".YOUR_CLASS"
android:screenOrientation="unspecified" // or what you want
android:theme="@style/Theme.Design.NoActionBar"/>
Upvotes: 2