orientation

UI autorotation works only on some devices???

Hello, I'm having quite interesting (but very annoying) problem with (not only) UI autorotation. I'm working on the app which contains tabbar controller with couple of navigation controllers as tab items. One of those controllers allows for autorotation to landscape mode. Interesting is that it perfectly works in Simulator as well as o...

Android Bluetooth crashes after orientation change

Hi, My code is based on the BluetoothChat sample from the API. I connect to another device just fine and I can read and write to the connection no problem. But then if I turn the device the orientation of the UI changes automatically. After this, if I try to write to the Bluetooth connection, my application crashes! It seems weird that...

Detecting the iPhone Device is flat

To detect the orientation of the phone when taking a picture I use orientation == UIDeviceOrientationLandscapeRight orientation == UIDeviceOrientationPortraitUpsideDown orientation == UIDeviceOrientationPortrait orientation == UIDeviceOrientationLandscapeLeft But these work if the picture is being taken from the side. How do I check ...

How to change orientation of xml "layout" area in Eclipse

The xml files that contains the Activity layouts can be rendered by Eclipse. How do I get that Eclipse screen area to have vertical orientation, not horizontal (inside Eclipse - it correctly shows as vertical in the emulator)? Peter ...

iPad Orientation Paradigm

I'm not a super awesome designer so this new paradigm has me a little cranky. The iPad is not supposed to have a standard orientation, and should/shall display screen contents at whichever orientation the user decides. This has me sort of stumped. I can keep my UI designed the way I want it in landscape mode, but switching to portrait...

Android - Forced locale resetted on orientation changes

I try to force the locale in my app to one the user specified. As this may be used to demonstrations, I want to change the language/locale in the app and not anytime for the whole device. I looked around SO and tried to use every hint I found here. The result: I can restart my test activity with the new language, but if I change the ori...

iPhone Prevent application to automatically change orientation to portrait when a video stop

My application is in landscape mode and I use MPMoviePlayerController to play an sample video. It works fine but when I stop the video with the OK button (or if I wait until the movie ends), the orientation automatically changes to portrait. Is it possible to keep application in landscape mode when the OK button is pushed ? I use the f...

IPHONE: After Removing / Adding Subviews in the App Delegate, Orientation Changes Fail

I am using my application delegate to swap out views. First I remove the current view, then I add the new view, then I run a quartz animation. No matter what view I load first, the orientation changes occur as expected. As soon as I start adding new views (removing the old) to the window in the application delegate, orientation changes ...

android: how do i perserve the data in my arrayadapter/listview when change orientation?

as above, is it done automatically? My list was empty once the orientation chMYanges? and nope, i need the orientation change =) My adapter public class ResultsAdapter extends ArrayAdapter<SearchItem> implements Filterable{ private ArrayList<SearchItem> subItems; private ArrayList<SearchItem> allItems;// = new ArrayList<SearchItem>();...

Orientation issues with Tab Bar Controller In WebView

Hi I am new to iphone development. In my app, i am using number of viewControllers, web view, Tool bar, Tab Bar and so on. Here, i want to achieve orientation(portrait or landscape or vice versa) corresponding device view in all the web views. I could achieve orientation in all web views except those web views are coming under the tab b...

How to lock orientation during runtime

Is there a way to lock orientation during runtime? For example I'd like to allow the user to lock the screen to landscape if the user currently in landscape and toggle the menu option. ...

Switching Android SensorManager speed. What's a good practice?

Hello stackoverflow! I'm interested to switch between different sensor orientation speeds over time to optimize the program ie.. battery life. The routine may be called very often. I'm looking for the right practice. sensorManager = (SensorManager)getSystemService(Context.SENSOR_SERVICE); sensorManager.registerListener(s...

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

Hello, 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 variat...

Changing view size when orientation changes

I want my UIView subclass to behave so that when it is fitted in portrait orientation is has a certain size and another size when fitted in landscape mode. Is it possible to have the view indicate to the view controller that's resizing it when the orientation changes that it has this "ideal size"? To clarify, I'm confident that this is...

[[UIDevice currentDevice] orientation] always null

As per the title. Calling [[UIDevice currentDevice] BeginGeneratingDeviceOrientationNotifications] has no effect. DidRotateToInterfaceOrientation etc events are working fine, but I need to be able to poll the device orientation arbitrarily. How can I fix/do this? The long story: I have a tab application with a navigation controller on...

UIButton Origin and Device Orientation

Hey there, I might be crazy, but for some reason this problem is stumping me. I have a view controller that is set to auto rotate to orientation. Inside I've got two subviews. One is a uibutton. All I want is for my button's origin to stay locked to the bottom-left in portrait and bottom-right in landscape (so it basically stays in ...

UIActionSheet positioning problem

I need to display a pop with a UISwitch and a Done button when user taps on a button and save the state of the switch when the done button in the pop up is tapped. So I use UIActionSheet to do this - sheet = [[UIActionSheet alloc] initWithTitle:@"Switch Setting" delegate:self ...

UIActionSheet position on landscape and portrait

UIActionSheet positioning is not centered when I open it in landscape mode. If I set bounds or change the frame. The contents inside the UIActionSheet which is a subview changes but the actual sheet remains in the same place which looks very awkward. How do I move the UIActionSheet along with it's subview to the center of the screen? ...

WPF to XPS in landscape orientation

Hello, i am trying to to generate a XPS Document from a WPF Control. Printing works so far, but i cannot find a way to create the XPS in landscape mode. My code to create the XPS file, mostly taken from another SO page public FixedDocument ReturnFixedDoc() { FixedDocument fixedDoc = new FixedDocument(); PageCo...

AdMob and UINavigationControllers

I'm playing around with AdMob and I"m trying to get something going with an auto-rotating view inside a uinavigationcontroller. I have the ad at the top of the screen. Not sure if this is the right approach, but in my LoadView method I have: self.navigationController.view.frame = CGRectMake(0,48,320,432); The navbar appears below the ...