orientation

Resize view on iPhone when rotating

岁酱吖の 提交于 2019-12-09 17:58:53
问题 I have an application with many views. I want only a couple of the views to be able to rotate to landscape when the device is rotated. I found out that I couldn't use (BOOL)shouldAutorotateToInterfaceOrientation because that would rotate every view in my app. I found a solution to this problem here on Stack Overflow but now I have another issue to deal with. The view rotates when I turn the device but it still shows the view as if it were still in portrait mode (straight up and down). The top

Compass direction is different depending on phone orientation

a 夏天 提交于 2019-12-09 17:58:29
问题 My augmented reality app needs the compass bearing of the camera view, and there's plenty of examples of getting the direction from the sensormanager. However I'm finding the resulting value different depending on the phone orientation - landscape rotated to right is about 10 degrees different to landscape rotated to left (difference between ROTATION_0 and ROTATION_180 is less, but still different). This difference is enough to ruin any AR effect. Is it something to do with calibration? (I'm

Android app losing data during orientation change

徘徊边缘 提交于 2019-12-09 12:43:22
问题 I've got an app that I've copied from a tutorial that captures an image with MediaStore.ACTION_IMAGE_CAPTURE . I've got some kind of weirdness going on when I run the app on my phone. The camera app itself is flipping its orientation a couple times during operation even though I am not moving the phone. It briefly goes into landscape mode before returning to the tutorial app. Consequently, the tutorial app is flipping back to portrait mode after control is returned to it, and the image is

Inconsistent orientation sensor values on Android for azimuth/yaw and roll

烂漫一生 提交于 2019-12-09 06:24:23
问题 I’m having trouble getting good orientation sensor readings. The sensor readings seemed unreliable, so I tested my code against two free sensor test apps (Sensor Tester (Dicotomica) and Sensor Monitoring (R's Software)). I found that while my readings often agreed with the sensor test apps, occasionally the values for azimuth/yaw, and roll differed by up to 40 degrees, although the pitch reading mostly agreed. The two free apps always seemed to agree with each other. I put my code into a tiny

AVFoundation exporting orientation wrong

纵然是瞬间 提交于 2019-12-09 05:28:06
问题 I'm attempting to combine an image and a video. I have them combining and exporting however it's rotated side ways. Sorry for the bulk code paste. I've seen answers about applying a transform to compositionVideoTrack.preferredTransform however that does nothing. Adding to AVMutableVideoCompositionInstruction does nothing also. I feel like this area is where things start to go wrong. here here: // I feel like this loading here is the problem let videoTrack = videoAsset.tracksWithMediaType

Orientation does not behave correctly with Photo in ALAsset

此生再无相见时 提交于 2019-12-09 04:20:15
问题 I current have an app that uses ALAsssetsLibrary to fetch the photos. I have placed the photo to an image view and I am able to upload to the server. When I tested on the real device after taking some photos, I found out the photos that supposed to be taken in Portrait become a landscape. Therefore, I called different function to get the CGImage like this: UIImage *image = [UIImage imageWithCGImage:[representation fullResolutionImage] scale:1.0 orientation:(UIImageOrientation)[representation

第九次作业

﹥>﹥吖頭↗ 提交于 2019-12-08 18:45:32
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity" android:padding="16dp" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="130dp" android:orientation="horizontal" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="姓 名:" android:textSize="18sp" /

Android: Camera Preview Orientation on HTC EVO (Android 2.1 or 2.2)

六眼飞鱼酱① 提交于 2019-12-08 18:40:29
I am developing an Android application that relies on the camera API, using an HTC EVO as my testing device. No matter what I've tried so far, the only time the camera preview looks right is in landscape mode (90 degrees rotation, to be specific). It seems as though there is no way to orient the preview correctly when in portrait mode (0 degrees rotation). The default camera application on the device (for HTC Sense) allows for any kind of rotation without any problem, so I know that there is no hardware limitation. I even downloaded some source code from HTC's developer site , but it's all in

ipad portrait orientation css, only landscape will work

谁说胖子不能爱 提交于 2019-12-08 17:03:46
问题 if you go here on an iPad, http://eastcoworldwide.com/Proofs/mint/index.html and click through to Chapter1 > Chapter 1 > Get started... you will see after a loading screen the Chapter 1 page. Basically what this is, is html embedded into an iframe being pulled together by html 5 and javascript. the html in this iframe calls its own css sheet called other.css. The html file that pulls this all together is calling a stylesheet called styles.css. Obviously I want in portrait view the content

Sometimes don't get onCreateLoader callback after calling initLoader

China☆狼群 提交于 2019-12-08 15:36:40
问题 I have an activity that calls initLoader when it is created in order to load the data that the activity will display. Normally, this works fine. I have breakpoints set to see the order that everything happens. First I call initLoader, then I get the OnCreateLoader callback, then the OnLoadFinished callback, then everything is great. However, I noticed that if I changed the orientation on my Android that I don't get the OnCreateLoader callback or the OnLoadFinished callback, resulting in no