FAQ Database Discussion Community


xcode ios 7 and ios 8 screen bounds bug

ios,objective-c,ipad,screen-orientation
Hello everyone i am using latest xcode and 2 devices(identical). One with iOS 7 and the other one with iOS 8 In portrait mode on iOS 7 i get the resolution 1024x768 (which is landscape) In portrait mode on iOS 8 i get the resolution 768x1024 ( actual portrait )...

A landscape only subview appears as potrait on iOS 7 works fine on IOS 8

ios,objective-c,ipad,uiwebview,screen-orientation
I am trying to add a subview on a landscape only app in a landscape only mode. This seems to work fine on newer iPads, However when testing this on an iPad 2 the subview only seems to appear in a portrait mode. What could I be doing wrong here?...

How to determine orientation of home screen

android,screen-orientation,android-appwidget,android-orientation,homescreen
Is there a way to determine programmatically the orientation of the home screen? I've toyed with the following: WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); int rotation = windowManager.getDefaultDisplay().getRotation(); and Resources r = context.getResources(); int orientation = r.getConfiguration().orientation; But neither seems particularly suitable because, as I understand it, the home screen may...

Difference UI for portrait and landscape ipad

ios,objective-c,ipad,screen-orientation
I would like to create an application like this: On iphone (both portrait and landscape) and ipad portrait, I have a table view screen, tap on item row will navigate to another detail screen look like other basic application. But when I rotate screen to go to landscape on ipad,...

Force the App to become on Portrait View when clicking a Button

c#,windows-store-apps,windows-8.1,screen-orientation
On a certain ButtonClick event, I need the app to turn to Portrait View even if the user is holding it in the Landscape View. The ApplicationView only has a GetForCurrentView().Orientation string, not a Set. How can this be possible?

iOS+SpriteKit: How to force portrait mode?

ios,sprite-kit,orientation,screen-orientation,uiinterfaceorientation
I'm currently working on a SpriteKit game for iOS 7+ and XCode 6. The game should always be presented in portrait mode. So far I have implemented these methods in my view controller: - (BOOL)shouldAutorotate { return NO; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } This works fine as long...

viewWillTransitionToSize:withTransitionCoordinator: Not being called automatically

ios,objective-c,screen-orientation
I want to call the iOS 8 method viewWillTransitionToSize:withTransitionCoordinator: to handle transitioning to different device orientations but it does not seem to be called automatically. I have previously handled orientation changes via NSNotifications (i.e. orientationChanged:). I have included NSLogs within the viewWillTransitionToSize:withTransitionCoordinator: method but they are never called and the...

android app having different orientation for its items when changing the screen

java,android,xml,screen-orientation,displayobject
my items on large screen like 10.1 works fine and every item in its position but if i change the screen to 4 or 3, some of my items disappear and some appear in large font related to the device screen, so i want it to appear all items on...

How can I control android webview activity changes when I change screen orientation?

java,android,android-studio,android-webview,screen-orientation
import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.res.Configuration; import android.graphics.Bitmap; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener; import android.support.v7.app.ActionBar; import...

manage screen orientation change android

android,screen-orientation
I have a activity with multiples initializations ( fragments , sharedpreferences , services , ui components(search bar , buttons etc..)...) and i do not want to restart the activity when the screen orientation change I found a easy ( and working solution ) by using android:configChanges="keyboardHidden|orientation|screenSize" but my technical manager...

UIImagePickerController shows black bar when zooming – Is this a bug in iOS?

ios,uiimagepickercontroller,screen-orientation,uiinterfaceorientation
Edit: It has been suggested this post is a duplicate, which is not the case as the black bars are not initially present an an affine transformation does not remedy the problem. I run this on an iPad Air 2 and target iOS 8. I have a UIImagePickerController whose showsCameraControls...

Responsive css always applying landscape

html,css3,responsive-design,screen-orientation
I'm trying to understand why my css is always applying the h1 font size in landscape instead of portrait when I am in portrait (I'm a noob in responsive design). Anyone have an idea of what I'm doing wrong ? Thank you ! Guillaume **** edited new version: now working....

jQuery fire function on portrait/landscape

jquery,html,css,screen-orientation
I am using jQuery to fire different css transitions for an interactive website, like move object A to spot 1 on click. Now these options should be different on different viewports. While its easy to achieve this in css with classes, I do not know how to fire functions when...

Android splash screen for both landscape and portrait orientation

android,xml,splash-screen,screen-orientation
How can I modify my this code to set splash screens for both landscape and portrait orientation. I managed to work on portrait mode and it is working fine. i like ti make it for both the orientation. please modify this code. This is my SplashActivity.java. public class SplashActivity extends...

How to detect physically single-orientation (non-rotating) Android device programmatically?

android,device,screen-orientation,landscape-portrait
We all know that Android was invented for handheld mobile devices but now there are lots of non-mobile devices you'd never dream of picking up and rotating such as TVs, and if I'm not mistaken even PCs (or things that closely resemble PCs) that run on Android. For example the...

@media Orientation Width

css,media-queries,screen-orientation
When specifying min-width and min-device-width media queries, is the width you declare based off the current width of the phone or the potrait width of the phone? For example, an iphone4 has a width/height of 320x480 in standard/portrait orientation and has a device-width of 320. If the phone is held...

OpenGL ES context squashed on unlock - landscape to portrait

android,opengl-es,screen-orientation,android-context,unlock
Working on a game that only runs in Portrait mode, I tried forcing sensorPortrait via the manifest: android:configChanges="locale|orientation|keyboardHidden|screenSize|screenLayout" android:screenOrientation="sensorPortrait" But when I lock the device in portrait, rotate it to landscape and then unlock it this happens: And this is How it looks in portrait: I think this happens because...

Saving fragment state after screen rotation

android,android-fragments,screen-orientation
I am trying to deal with saving the fragment's state in order to avoid problem when the screen is rotated. It happens a strange thing: when I rotate the screen for the first time everything works, but when I rotate the screen for the second time application crashes: Here part...

Device Orientation Carry Over

android,unity3d,screen-orientation
I'm using Unity 3D to create a simple menu. I couldn't get ancors so instead, I've used two Canvas with different layouts according to Landscape and Portrait. This works perfect for me. BUT. I have to properly set the device in that orientation for it to properly register. To explain...

Restrict Interface Orientation in iOS 7 and iOS 8

iphone,ios7,ios8,screen-orientation,interface-orientation
I am trying to implement something where I stuck at one point. I want some orientation restrictions as follows: For iPhone 4, 4S, 5, 5S, & 6 - Portrait Only For iPhone 6 Plus - Both Portrait & Landscape For iPad - Both Portrait & Landscape I have tried all...

How can I define different layouts for both landscapes?

android,layout,landscape,screen-orientation
I am trying to define two different layouts for both right landscape and left landscape.. like in a calculator app that both orientations show different buttons. I have tried layout-land but that only works for one landscape layout. I am new to this and this is my first app so...

How can I globally detect when the screen rotation changes?

android,screen-orientation,screen-rotation,orientation-changes
Question In an Android service, I want to detect whenever the screen rotation changes. By rotation, I don't just mean portrait versus landscape; I mean any change to the screen rotation. Examples of such changes are changes to: Portrait Reverse portrait Landscape Reverse landscape Note that this question is not...