orientation

iPhone UIActionSheet auto-rotating not working

流过昼夜 提交于 2019-12-23 10:40:49
问题 I read a lot about that. People say it will not autorotate whene its parent is not set to auto rotate. I tried everything but no luck. I created view-based app (v4.2) with a button that executes this: UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Title" delegate:self cancelButtonTitle:@"Cancel Button" destructiveButtonTitle:@"Destructive Button" otherButtonTitles:@"Other Button 1", nil]; actionSheet.actionSheetStyle = UIActionSheetStyleBlackOpaque; [actionSheet

Android onConfigurationChanged() is not being called in Activity

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 08:51:32
问题 I realize that there are a couple other posts on this topic, however the solutions for those posts are not working for me. Basically, I want to cease my Activity from restarting upon a device orientation change. To do this, I have modified the activity in the manifest file: <activity android:name=".MyActivity" android:configChanges="orientation|keyboardHidden"></activity> and I have overridden onConfigurationChanged() in my Activity: @Override public void onConfigurationChanged(Configuration

The ideal surfaceView Camera orientations and proportions (avoiding preview stretching) - android

↘锁芯ラ 提交于 2019-12-23 05:59:39
问题 I've started a project which contains of a camera surfaceView (used in order to live image preview on the screen) from beginning I thought it shouldn't be much problems in implementing this, but for now I've got stuck within the part concerning the preview orientation and it's proportions, I've been searching Stack's topics about surfaceview orientations and stretching issues but I couldn't get a good result out of them at all. What I would like to do is to obtain preview in the same angle,

Best way to change UIViewController view NIB programmatically

房东的猫 提交于 2019-12-23 04:53:36
问题 I have this iPad application with different NIBs and views. Each view has two NIBs, one for potrait orientation and one for landscape, so i'm searching for a method to programmatically switch NIB for a given UIViewController . Right now i have this function that i'm using in the willRotateToInterfaceOrientation method of each controller : void UIHandleRotation( UIViewController *controller, NSString *nibName, UIInterfaceOrientation orientation, BOOL transform ){ double angle = 0.0; if(

how to show dialogs in android taking screen orientation changes into account

懵懂的女人 提交于 2019-12-23 04:40:14
问题 this is driving me crazy. i have read the documentation for creating dialogs in Android and it seems to make sense, except when the screen orientation changes. I have Activity.onCreateDialog() where I create the dialog. I also have Activity.onPrepareDialog() where I prepare the dialog. Then in my Activity.onCreate() method, I call showDialog(id) that's all well and good and behaves properly. now comes the tricky part. I rotate the screen. it destroys the activity and creates a new one.

Autorotation in ios5--most common reasons why it fails?

末鹿安然 提交于 2019-12-23 03:35:31
问题 I'm confused about the implementation of autorotation in ios. I have a UIViewController, and I tell it to autorotate inside shouldAutoRotateToInterfaceOrientation. However, it doesn't work. So I read something about how I need to look at the navigation stack AND/OR whether a UITabBarController was used, because this has been known to cause all kinds of confusion (raises hand). In fact, I have a UITabBar and a UINavigationController. The UIView that I want to rotate is being pushed onto the

Clarifications on managing orientations in UIViewController

≯℡__Kan透↙ 提交于 2019-12-23 03:32:11
问题 I have a configuration like the following: UINavigationController -> ViewController where ViewController is the root view controller for the navigation controller. ViewController can present modally another view controller, ModalViewController , like the following. self.presentViewController(modalViewController, animated: true, completion: nil) Within ModalViewController I override the following method. The modal view controller in fact can be presented only in Landscape mode. override func

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

旧城冷巷雨未停 提交于 2019-12-23 03:26:20
问题 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

Always open a view in portrait mode in view in ipad?

纵饮孤独 提交于 2019-12-23 02:56:29
问题 When I navigate from one view to another view, I want to open the view in portrait view only.ie I am navigating from a first view (landscape) to second view. I want the second view to always be open in portrait view.In my case when I launch in landscape, the view is in portrait but the device is in landscape mode. The output I expected was if I open the view in portrait and and on rotating it to landscape with no rotation. EDIT: If you open the app in portrait and if you given auto-rotate as

Android Front Camera recording video but plays upside down…!

浪子不回头ぞ 提交于 2019-12-23 02:39:48
问题 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 . 回答1: You might want to look at how the AOSP VideoCamera activity is implementing this: if (info.facing == CameraInfo.CAMERA_FACING_FRONT) { rotation = (info.orientation -