I'm developing a WP/ camera app that shows the picture that have been taken. Is there a way to somehow know how your currently holding your camera so that the image preview will display the picture as portrait or landscape?
Have a read of How to Handle Orientation Changes in WP7
On PhoneApplicationFrame you have Orientation property
Just replace or add the below codes to PhoneApplicationFrame.....
SupportedOrientations=ā€¯PortraitOrLandscapeā€¯
Related
I use for taking photo this:
using (IMediaFile captureFile = await MediaGallery.CapturePhotoAsync())
But I want next behavior. Check orientation (very important orientation of Native Camera View). If the user hold phone vertically -> he sees some message on the top like "Please take photo ONLY on landscape mode". When the user rotate the phone to landscape -> the message is hide. And again.
Please for Xamarin.forms.
Main issue is avoid taking photo on Portrait Mode. (photo must have Width > Height).
Thank you.
In my project (using the Marmalade SDK), I have fixed the screen orientation to portrait in the .icf file. When a user touches a button, a video plays (using s3e video). However, This video is also played in portrait mode (which is not conducive to viewing), and I want the screen to automatically rotate to landscape and have the video take up the entire screen when the button is pressed.
Any help would be greatly appreciated!
You may want to take a look at the s3eSurface API: http://api.madewithmarmalade.com/group__surfaceapigroup.html#ga70a312268193e75b29451da071c87ead
I guess something like s3eSurfaceSetInt (S3E_SURFACE_DEVICE_ORIENTATION_LOCK, S3E_SURFACE_LANDSCAPE) before playing your video and the same with S3E_SURFACE_PORTRAIT will do the trick :)
Landscape mode handle when auto screen orientation is ON and easily turn to portrait. But Auto Screen Orientation is Off then forcefully change supported orientation which effect on if Auto Screen Orientation is ON. Pls tell me these things in WP
How check auto screen orientation of setting ON or Off?
Another way to change orientation of screen contents?
To specify that your app supports portrait and landscape, you must set the SupportedOrientations property to PortraitOrLandscape either in the XAML or in the code.
Add this piece of code in your XAML within the <phone:PhoneApplicationPage>
SupportedOrientations="PortraitOrLandscape"
Take a look over here
Hope it helps!
Read this quick start tutorial on how to gracefully handel orientation change in windows phone 8
Screen orientation for Windows Phone 8
In short, if you need to support both orientations than first you need to change your SupportedOrientation in you page xaml SupportedOrientations="PortraitOrLandscape"
Then handle orientation Changed Event in the code for UI related changes(as explained in above artical)
You can use following page property on page load to check the current orientation of the screen when it is loaded.
this.SupportedOrientations
Hope this helps
I am using three20 to present a photo essay of a story I made after the February earthquake in Chile. I would like the app to display portrait type images when iPad device is in portrait orientation and landscape type images when iPad device is in landscape orientation.
So there would be two versions of every image, one cropped for portrait viewing and one cropped for landscape viewing and the app would show the version that is appropriate for the orientation the device is in.
I will crop these image versions separately. That way, the app would make full use of the screen in all orientations and users will read the story like a magazine.
Ideally, the view would change over to the corresponding image, staying where it is in the sequence of images, when the user rotates the device, so from portrait #4 to landscape #4 and vice versa, for example. But, if this is not possible, jumping back to the first image whenever iPad device is rotated is acceptable as well (push to separate TTImageViews maybe?)
The idea is to give to user the experience he is reading an illustrated story in all orientations. Can this be done? If so, can you give some clues?
If it can not be done putting a specific image in the background with the image viewer overlaying it may also be a solution. If separate fullscreen views for each orientation are not possible, then at least I would like to get rid of the black "autoresizing mask" parts of the screen..
Many thanks!
diederik
I am new to BlackBerry Java application development. My scenario is: In my application a gallery list of images will be displayed in a small icons. If I click on any image it will display in a large mode. Here I need to provide controls like front and back buttons. On clicking on those buttons the background image should change. In addition to that those buttons should be highlighted and the back ground large image should be transparent. How to do this?
Please guide me.
You can use Graphics.setGlobalAlpha() on paint() or to modify bitmap before preview.
Don't forget to set back normal global alpha value after bitmap drawing.