orientation

How can I save state between orientations?

In a previous question I asked how I could display two different layouts for portrait and landscape orientations: Problem switching to landscape orientation Now I would like to know how I can save the state of my application before it goes into another orientation? I seem to lose this data any time orientation changes. ...

Switching to landscape orientation is slow

This is getting called in onCreate(), how can I speed up orientation switching? private void setupChartView(int position){ Quote myQuote = quotesAdapter.getItem(position); this.symbol = myQuote.getSymbol(); String url = "http://chart.finance.yahoo.com/z?s=" + symbol + "&t=1d&q=l&l=on&z=l&p=s&a=v&p=s&...

iPad frame width and height mixup in landscape

THANKS FOR THE OVERWHELMING HELP HERE. I'VE JUST GIVEN THE BOUNTY TO THE CLOSEST ANSWER BECAUSE I WANT TO START A NEW BOUNTY, SO ONCE AGAIN THANKS IN ABSOLUTE TRUCKLOADS FOR THE TOP QUALITY HELP GIVEN HERE </sarc> I have done what this question said here: http://stackoverflow.com/questions/2647786/landscape-mode-only-for-iphone-or-ipad ...

iAds displaying portrait in landscape orientation from start

I got this iPhone app where I use AdWhirl to change between a number of ad networks. Now when iAds gets its turn in and the phone is in landscape orientation before the ad shows it will display the normal portrait iAd. If I then turn the phone to portrait and back to landscape it shows the correct longer and thinner landscape version of ...

How to handle Activities with different orientation?

I am having two activities in my app TestActivity (T1) and TestActivity2(T2). TestActivity is the launch activity which in turn starts TestActivity2. T1 has portrat orientation while T2 has landscape orientation (in the android manifest file). Now when T1 starts up and initiates T2, T1 gets destroyed and recreated again. Is there anyway ...

iPhone AVFoundation camera orientation

Hi All, I've been tearing my hair out trying to get the AVFoundation camera to capture a picture in the correct orientation (i.e. the device orientation) but I can't get it to work. I have looked at tutorials, I've watched the WWDC presentation and I've downloaded the WWDC sample program but even that doesn't do it. The code from my a...

UIView iPad orientation weirdness

When I receive a UIDeviceOrientationDidChangeNotification how do I tell if it's a portrait/landscape change or a face up/face down change? I also receive notifications in between landscape/portrait changes such as when the device goes 45 degrees between landscape & portrait. I only care about changes from full 90 landscape/portrait chan...

How can I animate my rotation smoothly?

I have an app that has a portrait layout. When I rotate my phone into landscape, it loads another layout that is strictly landscape (it is displaying an ImageView). How can I make the transition from portrait to landscape animate smoothly? ...

How can I get the current screen orientation?

I just want to set some flags when my orientation is in landscape so that when the activity is recreated in onCreate() i can toggle between what to load in portrait vs. landscape. I already have a layout-land xml that is handling my layout. public void onConfigurationChanged(Configuration _newConfig) { if (_newConfig.orientatio...

How can I save a current snapshot of my app before I rotate?

Is there a way I can save the current snapshot of my app before it gets destroyed (when it gets rotated): I know I can save all my data in public Object onRetainNonConfigurationInstance() {} But is there something simpler because I have a lot of data that would need to get saved. ...

Background UIImageView that doesn't get rotated

I have this UINavigationController-based iPad app that supports all 4 orientations. When I rotate the device, I'd like the background image to stay still and only have the UI on top of it get rearranged/rotated. I've succeeeded by returning NO to the UIViewController shouldAutorotateToInterfaceOrientation: and handle the orientation mys...

Apple SDK bug? View controller stack change during orientation rotation

Hello there, I have several view controllers which will be push to (pop from) a same UINavigationController. The problem is that if I navigation those view controller during orientation rotation, the frame of controller's view is not correct. For example, in portrait mode if I click on back button, then rotate to landscape immediately...

IPhone : Autoresizing on orientation change doesn't work correctly (sometimes doesn't seem to trigger at all) for some interface elements

I have been pulling my hair out one by one for 3 days now and still can't get the autoresizing on orientation changes to behave correctly :( I will try to describe the whole context, hope I won't forget anything important, if so just ask ! I plan to support all orientations on my App (only for some of the views, not all). So first thin...

UIActionSheet won't display properly in landscape mode

Hi, I am trying to display a UIActionsheet in my application. It works perfectly in portrait mode but when I try to have it display in a landscape orientation it still slides in from the bottom. However it no longer uses buttons and displays with the picker control like it is in landscape mode. Its just in the wrong position. I don't...

portrait view inside landscape activity

Hi Guys, I have a question, how to show a portrait view inside landscape activity (eg. camera activity) for example: i have a camera activity (which should always on landscape mode), but i want my button (which is overlay on top of camera screen) following handset orientation. so when i turn my handset as a landscape, then my button o...

How to deal with orientation change with a ProgressDialog showing?

I am showing a ProgressDialog in the onPreExecute method of an AsyncTask object and canceling the ProgressDialog in the onPostExecute method. In the doInBackground method I am making an HTTP request for user registration. I wish to allow screen orientation changes. When I change the orientation while the doInBackground method is still ...

How can I do a fade animation when the user rotates the phone?

My app's main screen is a listview in portrait mode. When it is in landscape orientation it switches to an ImageView. I want to be able to animate a fading transition when I switch orientations. How can I go about doing this? ...

Fixing the orientation of view controllers

Hi friends... I have a button in my RootViewController .... when i click on this button it will navigate to some otherViewController. but i want that when i click on the Button otherViewController's Orientation should be Landscape & when i back from this page(otherViewController) i should got again Portrait mode. lots of Thanks for any ...

Restoring view after orientation change in android 1.6

Hi. Here's the flow. I have a button in a layout along with a form as view stub. On click of that button, view stub is inflated and brought to focus. When I change the orientation, the activity gets restarted and goes to main screen with button. Can someone please tell me how to handle orientation change ? I mean, I want the screen to be...

When changing UIWindow subviews, orientation is not set

If a view is added to the window, orientation is set as portrait even if the device is in landscape. If the view is added in the app delegate, application:didFinishLaunchingWithOptions: method, then it works correctly. But if the view is added later it does not. As an example, I have a routine to switch views. Simplest form is: - (void...