Is it possible to disable orientation changes for an activity but still be able to rotate the keyboard?
I would like to be able to write text in landscape mode but keep the activity mode fixed in portrait mode.
Related
Hey i'm trying to create a behavior like YouTube full screen button.
I have a button that will force rotate from portrait to landscape.
And it should stay in landscape till the user rotates the device to landscape and back to portrait.
My problem is that when i use getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE)
And the phone is in portrait the view rotates to landscape for a second and Straight back to portrait.
I'm building an app with appcelerator studio. In my first activity I've a box with text, label, image and button.
The layout is good if the smartphone is in portrait mode, but if try to move the smartphone in landscape mode, the layout is not good.
Now there is a mode to create two graphic?
For example:
login.js
login-portrait.xml
login-landscape.xml
so from code, if the device is in landscape mode I load this xml layout, if the user change the orientation I load the other view.
It is possible to do this?
I am trying to prevent myy app orientation to landscape to portrait or vice versa when I lock the screen by clicking screen rotation to off.I saw that once I deselect screen rotation, the entire screen locks up including the screen of the apps I have on my device except for my app where orientation change still triggers landscape portrait recognition even when locked.How do I go around it? DoI need to set something in android manifest to make it work in accordance with the screen rotation ?
Thanks!
You can set either add android:screenOrientation="portrait" or android:screenOrientation="landscape" parameter to your AndroidManifest.xml.
edit:
You can also "lock" screen orientation programmatically using setRequestedOrientation (int requestedOrientation)
If you want to lock orientation when user locks it in the system you need to add android:screenOrientation="user" in your activity tag
I want to set the orientation of my activity to reversePortrait. To do this, i set the following value in the activity of my manifest file:
android:screenOrientation="reversePortait"
But this only works you enable "Screen Rotation" from the settings of the device. If "Screen Rotation" is disabled it shows the screen in portrait mode instead of reverse portrait.
Please help.
insert
android:configChanges="orientation"
below
android:screenOrientation="reversePortait"
It means the developer takes the whole control of the screen rotation, not the android pattern
The camera app on Android locks its orientation to portrait, and fakes an orientation change when you turn to landscape. The screen never re-orients itself (you don't see the screen reload or shift at all), but the icons turns to make it seem like it changed the orientation. How are they achieving this?
Let's say I did this. So I'm locked in landscape mode, and I rotate the phone so I'm in portrait (at least that's what it looks like to the user). Now if I have any dialog that pop up on top of this Activity, I'd want them to pop up in portrait orientation. How would I achieve this?