orientation

Android: Orientation changes erase modifications made to my ImageView

旧街凉风 提交于 2019-12-08 01:22:54
问题 I have app in which I have ImageView. I open new activity, where I paint something by finger and this bitmap return to my ImageView. everything is ok but when I change orientation now, my activity with ImageView is repaint or restart and imageview is empty. I try everything, I try SaveState and restore state, try configurationChange, and other, but nothing is working... package jilova.Android.TextFolder; import java.io.ByteArrayOutputStream; import jilova.Android.Enums; import jilova.Android

Cordova 3.1 Oriention not working

落花浮王杯 提交于 2019-12-08 00:32:51
问题 I have an application (Cordova 3.1) which should only be displayed in portrait. My config.xml: <?xml version='1.0' encoding='utf-8'?> <widget id="de.something.test" version="0.0.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Something 2.0</name> <description> A sample Apache Cordova application that responds to the deviceready event. </description> <author email="dev@callback.apache.org" href="http://cordova.io"> Apache Cordova Team </author>

iPad Orientation Checking UIView Class?

瘦欲@ 提交于 2019-12-08 00:25:44
问题 I have a UIView class which I add to my main UIViewController and I need to check the orientation of the device (iPad) at the launch of the app, in the viewDidLoad method. However because the class is a UIView (not UIViewController ) I can't use methods such as willAnimateRotationToInterfaceOrientation . So I attempted to use this in my UIView class: if (([[UIDevice currentDevice] orientation] == UIDeviceOrientationLandscapeLeft) || ([[UIDevice currentDevice] orientation] ==

Orientation Issue while video recording in Portrait Mode android grafika

杀马特。学长 韩版系。学妹 提交于 2019-12-07 21:48:41
问题 I set the device Orientation Landscape mode then it saves the video perfectly. if I capture a video with both sides. But I set the device orientation Portrait Mode this work weird. For Example: Below Screenshot while i Recording video : But when i save the video and see in MXPlayer then it's look like this: I use below code : Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay(); if (display.getRotation() == Surface.ROTATION_0) { mCamera

Handling size of image after orientation change WP7

时间秒杀一切 提交于 2019-12-07 21:00:24
问题 I've got an Image with an overlay Canvas with some rectangles whose position is relative to image's size. The problem comes when I change the phone orientation, because image size changes (or at least, the renderization) but I can't manage to re-distribute the rectangles according to the new size, and the OrientationChanged event doesn't help me because it's fired before rendering the image (so all the rectangles go to (0,0)) Anyone can help me finding the correct event? 回答1: I'd either not

iOS 8 - Launching the application in Landscape mode

て烟熏妆下的殇ゞ 提交于 2019-12-07 19:46:12
问题 My iPad application supports all the orientations and it worked fine in iOS 7 as well. However in iOS 8 , launching the application in Landscape mode made my login view draw the landscape view within a portrait frame. After doing some analysis I found out that the application window does not take the correct orientation while launching in Landscape . Doing a rotation after that corrects the UI since it takes the correct orientation from that point onwards. Would someone be able to guide me

How to set ContentPage orientation or screen orientation on particular page in Xamarin.Forms cross platform

99封情书 提交于 2019-12-07 19:31:37
问题 How to set Content-Page orientation or screen orientation on particular page in Xamarin.Forms cross platform. I have set ScreenOrientation = ScreenOrientation . Portrait at property of all platform but I want to show some page show in both variation means Portrait and Landscape, so how to set on page in `xamarin.forms. set screen orientation not device wise but set on page-wise some pages show in Landscape & some page show in Portrait in xamarin forms cross- platform 回答1: You can do this by

Is calling updateViewConstraints manually a good idea?

痞子三分冷 提交于 2019-12-07 18:01:31
I'm creating my constraints mainly in viewDidLoad . In updateViewConstraints I'm adding or removing some subviews and additionally adding and removing constraints. As a side note I'm using a container with child view controllers and I'm reusing the same view for different orientations (full in landscape, in a popover in portrait). Because I have my complete setup in updateViewConstraints I have to call it in some situations manually to adapt the visual changes and not to brake the constraints (e.g. when presenting the same view in a popover, or on iOS 7 it is not called on rotation). I also

Android Front Camera recording video but plays upside down…!

淺唱寂寞╮ 提交于 2019-12-07 17:55:50
I have managed to create an android application to record videos but the problem is with the orientation of front camera video . The output is not the as per requirements . It gets automatically rotated . Application orientation is landscape . So, I need to record using front cam in landscape mode. Nothing is working out . You might want to look at how the AOSP VideoCamera activity is implementing this: if (info.facing == CameraInfo.CAMERA_FACING_FRONT) { rotation = (info.orientation - mOrientation + 360) % 360; } else { // back-facing camera rotation = (info.orientation + mOrientation) % 360;

How can I detect if an iPhone is rotating while being face up in a table?

℡╲_俬逩灬. 提交于 2019-12-07 17:49:05
问题 Is there a way to detect if an iphone lying down in a table face up is rotating?. I do realize that this kind of movement is not reported by the accelerometer and neither is it reported to the - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation method. Is there a way to detect angle variations for the phone rotating this way?. Thank you. 回答1: The gravity vector will be constant as it rotates on a flat table so you won't see anything on the