screen-orientation

Android: Screen Rotation within Activity doesnt switch portrait/landscape layout

I build my Android Application and want do add layouts for different orientations now. I created a layout-land folder and put a different layout for my first Starter Activity "myStartActivity" (with the same name as the layout i used before for both orientations) in there. Depending on my Screen Orientation BEFORE i start the app the ri...

android disable screen rotating

When I press a button, I would like to disable screen rotation on all my activities. How can I do that? BTW, phone can be located in landscape|portrait position when user click the button. ... ...

iPhone & iPod Touch Orientation Problem

I have a home screen that loads content from the internet. During the application if the phone or iPod loses internet connection a UIAlertView pops up allowing users to restart the application. When they click restart the home page is pushed onto the screen. The home page only supports one orientation: portrait. It looks horrible in ...

how to show a webview inside an activity in the middle of screen

Hi,I am having issue while showing a WebView in an activity in the middle of the screen. I have an activity and I want to show a webview in the center of screen. My activity is transparent so background activity will be visible. Whenever I try to create a webview and add it to activity using setContentView(webview) it always shows the vi...

Webview orientation not working

Here is my code. everything works great except the orientation, it reloads every time I rotate the phone it reloads to the home page, it is a pain. can anyone tell me where the problem is. import android.app.Activity; import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; import android.view.G...

Programatically enabling/disabling screen rotations in Android.

I have an app which displays a large amount of text for the user to read. I've found that when reading while lying down, I get annoyed that the screen rotates even though my head and the screen are aligned. I do not want to set this to be permanently in portrait mode, so I think this would preclude an approach of setting the android...

One view controller, two views for portrait and lanscape

Hello, I have one UIViewController which manage a portrait view and some application logic. However, I need to setup a different view for the landscape orientation. The widgets between the 2 views are mainly the same but their layout is very different. My first try was to use one UIViewController and one associated XIB. In the XIB, I ...

Problems getting bounds on rotation

I've looked all over the net trying to figure out how to get the bounds based on orientation. The notifications are working fine but I'm getting the bounds of the view via: CGRect cgRect = self.view.bounds; which returns {0, 0}, {320, 460} which is correct but when the device is rotated it returns the same CGRect, where I was expectin...

How to Detect Screen Orientation Change Event in Windows Mobile 5 & 6 App, With Embedded C++?

Hello, I am in way over my head, and am hoping anyone here can help. I am working with an application that is running on Windows Mobile OS, version 5 and/or 6, which is written in Embedded C++. The problem is that controls in the app get all messed up and moved around when the user does something to switch the display orientation, such...

android phone screen orientation related issue ?

friends, i am facing an issue related to android phone screen orientation If i change the orientation of the phone, then it loses the context, if i am in middle of filling a simple form. So, the phone is vertical, I am using soft keyboard, I make it horizontal, so that I can use the keyboard easily again or something else, and kaboom,...

How do you force an orientation change in an Android Instrumentation test?

I'm writing some acceptance tests for an application using the ActivityInstrumentationTestCase2 class. I want to cause an orientation change from within the test to ensure that a number of things happen. Among these things are ensuring that Activity state is preserved, but also I'd like to ensure that the appropriate layout for the orien...

How to prevent Custom Views from losing state across screen orientation changes

I've successfully implemented onRetainNonConfigurationInstance() for my main activity to save and restore certain critical components across screen orientation changes. But it seems, my custom views are being re-created from scratch when the orientation changes. This makes sense, although in my case it's inconvenient because the custom...

Android VideoView Landscape Orientation Problem

I am pretty new to Android and mobile development in general. I am creating an Android application that plays a video using VideoView after a button is selected. The problem is when you rotate the phone the video restarts. I know its because the activity is destroyed and recreated when it is rotated. So I just locked the video player in ...

Display image from URL - sizing and screen orientation problems

I am trying to display an image from a URL, which may be larger than the screen dimensions. I have it kind of working, but I would like it to scale to fit the screen, and I also have problems when the screen orientation changes. The image is tiny, and I would like it to scale its width to the screen as well. (In both cases, I would li...

Android: Temporarily disable orientation changes in an Activity

My main activity has some code that makes some database changes that should not be interrupted. I'm doing the heavy lifting in another thread, and using a progress dialog which I set as non-cancellable. However, I noticed that if I rotate my phone it restarts the activity which is REALLY bad for the process that was running, and I get a ...

iPad view in incorrect orientation after dismissMoviePlayerViewControllerAnimated

My iPad app displays a movie full screen using the convenient MPMoviePlayerViewController class. I present it like this: [self.hostController presentMoviePlayerViewControllerAnimated:playerViewController]; And later, when notified that playing is done, I dismiss it like this: [self.hostController dismissMoviePlayerViewControllerAni...

Viewflipper Receiver not registered error while orientation change in 2.1 and 2.2

I am using viewflipper for fling gesture recognition everything works fine for 2.0 and prior but in 2.2 and 2.1 it throws exception as "java.lang.IllegalArgumentException: Receiver not registered: android.widget.ViewFlipper" below is full debug trace. java.lang.IllegalArgumentException: Receiver not registered: android.widget.ViewFlipp...

Reloading UITableViewCell when changing orientation

Hi all, In my iphone app, im using a UITableView with each row containing 3 photos, and they are separated by a space = 50.0 pixels. When I change t landscape mode, I want this space to increase to 100.0 , but I cant achieve this. In the orientationChanged method, I specified that I want the space to be 50 in portrait and 100 in Landsc...

Orientation Problem in iPodtouch not in iPhone/iPad

hi! i have implemented application in iOS 4.0 and Provide LandScape Orientation it works fine with iPhone and iPad but gives problem in iPodtouch. i am making Universal build.Please give me some guidelines.Thanks in Advance. ...

problem in arresting landscape orientation in blackberry widget

Hi I tried following code to arrest landscape orientation in blackberry widget in vain I altered widget.java file found under Widget SDK packager/device_templates int directions = net.rim.device.api.system.Display.DIRECTION_PORTRAIT; net.rim.device.api.ui.Ui.getUiEngineInstance().setAcceptableDirections(directions); But s...