orientation

Orientation Issue while video recording in Portrait Mode android grafika

拜拜、爱过 提交于 2019-12-06 14:09:37
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.setDisplayOrientation(90); // layout.setAspectRatio((double) cameraPreviewSize.height / cameraPreviewSize.width); } else if

Xcode 4.5 SplitView broken orientation with iOS 5.1 (working on iOS6 thought)

邮差的信 提交于 2019-12-06 12:38:38
问题 I was working on a splitView project when the Xcode was updated to v4.5. Since then autorotation was working perfectly. After the update, autorotation works only for iOS 6. On iOS 5.1 i am stack in Portrait. I have read all possible solutions but nothing seems to be able to fix my problem. Below is what i have done so far: Checked that All orientations are in my plist. Replaced (BOOL)shouldAutorotateToInterfaceOrientation: with - (BOOL)shouldAutorotate { return TRUE; } - (NSUInteger

iPad Orientation Checking UIView Class?

删除回忆录丶 提交于 2019-12-06 12:01:23
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] == UIDeviceOrientationLandscapeRight)) { However, testing with some breakpoints, whatever the orientation is, the of

Android: Orientation changes erase modifications made to my ImageView

大城市里の小女人 提交于 2019-12-06 11:18:35
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.R; import jilova.Android.DatabaseFolder.LocalDB; import jilova.Android.DatabaseFolder.RequestRow;

Android传感器之-方向传感器Orientation功能实现与源码

ぃ、小莉子 提交于 2019-12-06 10:37:33
先明确一下空间坐标系的三个方向: x 方向就是手机的水平方向,右为正; y 方向就是手机的水平垂直方向,前为正; z 方向就是手机的空间垂直方向,天空的方向为正,地球的方向为负。 方向角的定义是手机y轴 水平面上的投影 与 正北方向的夹角。 (值得范围是 0 ~ 359 其中0=North, 90=East, 180=South, 270=West) 倾斜角的定义是手机y轴 与水平面的夹角 (手机z轴向y轴方向移动为正 ,值得范围是 -180 ~ 180) 旋转角的定义是手机x轴 与水平面的夹角 (手机x轴离开z轴方向为正, 值得范围是 -90 ~ 90) 也就是说,当你把手机水平放置在桌面上(屏幕向上)且手机指向正北(Y轴方向),此时传感器获得的xyz三个值应该都为0。 基于Rexsee对于方向传感器Orientation的扩展,我们可以很快的实现传感器功能,比如读取X/Y/Z方向角度值:rexseeOrientation.getLastKnownX();读取响应速度:rexseeOrientation.getRate();设置传感器检测周期:rexseeOrientation.setCycle(1000)等。具体的函数介绍可以在Rexsee社区的手册与源码中查阅: http://www.rexsee.com/CN/helpReference.php

iOS 8 - Launching the application in Landscape mode

杀马特。学长 韩版系。学妹 提交于 2019-12-06 10:08:30
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 through this? Thanks in advance. The issue seems to be the order of calls when you set up the window. You

How to write text with angle orientation in ImageMagick?

拟墨画扇 提交于 2019-12-06 10:05:01
问题 is it possible to use web fonts to write some text over the image with a particular angle orientation, and which command should I use? Guess it for example a text going from a left bottom corner to the right top corner. Here the working example code, that needs to be orientated: convert -size 600x357 xc:none -draw "image Over 0,0 0,0 'background01.jpg'" \ -pointsize 30 -font "geometricslab703bt-bold-webfont.ttf" -fill White \ -draw "text 140,175 'mijn ideale'" -append +repage \ result.jpg 回答1

UIView shadow issue with orientation

纵然是瞬间 提交于 2019-12-06 10:04:08
I have UiTableView within UiView . I want to set corner radius & shadow to UIView . I am using this code to give shadow with corner and its working fine. myView.backgroundColor = [UIColor clearColor]; [myView.layer setCornerRadius:10.0f]; [myView.layer setBorderColor:[UIColor lightGrayColor].CGColor]; [myView.layer setBorderWidth:1.0f]; [myView.layer setShadowColor:[UIColor blackColor].CGColor]; [myView.layer setShadowOpacity:0.8]; [myView.layer setShadowRadius:3.0]; [myView.layer setShadowOffset:CGSizeMake(2.0, 2.0)]; // below line is for smooth scrolling [myView.layer setShadowPath:

HTC Desire HD not accepts setParameter() with hardware.Camera

可紊 提交于 2019-12-06 09:30:37
问题 I'm a student and I am developing on Android 2.2 for a project. For my tests and app executions, I am using an HTC Desire HD (with Android 2.2). I just want to create a composant (class) to take a picture with the mobile device. I have an Android class, which I use for the getOptimalPreviewSize() method (this method is in the ApiDemos 2.2). This method is used to fix this type of error : 02-14 21:38:05.818: ERROR/AndroidRuntime(2884): java.lang.RuntimeException: Fail to connect to camera

EditText data is lost on rotating the device

筅森魡賤 提交于 2019-12-06 08:30:01
OK guys, I am done with it. I have been googling for last 2 days but I can't find the exact solution. Everyone is talking about configChanges and all those cliche things which do not seem to work in my case . I have a login screen which consists of 2 EditTexts. Now this login screen has different layout for both Portrait and Landscape orientation . So I had to create one login.xml in layout folder and another login.xml in layout-land folder. And to support orientation changes I overrid onConfigurationChanged() method in LoginActivity class. In this method I call setContentView(R.layout.login)