orientation

[Android] Layout orientation changes without activity interaction

Since working with Android I'm curious about how I can let Android do everything in respect to orientation change (layout vs. layout-land). Currently I have to feed the correct number of db columns and views to the cursor adapter. Is this the correct way or do I miss something? How do you guys do that? Please have a look at the two Sim...

iPad UISplitViewController rotates unnecessarily when modal dialog is closed.

I have a reasonably simple split view application adapted from iPhone code. The main functionality is in shared classes with iPhone and iPad specific classes inheriting and augmenting the code. All the classes used in the iPad app have the following: - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrie...

How to check if 'loaded' namespace exists, besides throwing exception?

For example if I have: use \models\foobar; How can I check if it exists before interacting with it? class_exists('foobar') does not work and catching exception in manner of: try { foobar::something(); } catch (Exception $e) { // Does not exists } is ghetto. ...

Determining roll angle (up/down) when Android phone is horizontal?

When the Android phone is on its side (horizontal orientation), the Roll represents the tilt, so to speak. When the phone is perpendicular to the ground (looking directly at the screen), the roll says 90. However, when you start tilting it forward or backward, as if you wanted to look down or up, the angle just decreases either way. ...

Landscape/Portrait conflict - iOS

hey, Just when i thought I had everything figured out .. i got this problem. the scenario. I got a simple tableView. and with a search bar in navigation item's titleView. The SearchBar is added to navItems titleView via a uibarbuttonitem in view controllers toolbar. NOW, normally After initiating the searchbar with [beginResponde...

finding orientation using getRorationMatrix() and getOrientation()

Im trying to get the direction of the vector pointing out of the camera, with respect to magnetic north. I'm under the impression that I need to use the values returned from getOrientation(), but I'm not sure what they represent. The values I get from getOrientation() don't change predictably when I change the orientation of the phone (r...

UIView frame size doesn't set properly in Portrait mode in iPad?

Hi Friends, Now i am working an iPad application.When i runs the application in portrait and Face up mode the view doesn't set the frame properly. After that rotating the view, the frame size is to be sets properly in the portrait and Face up mode. I don't know why its happened?. Please give me some idea for that? In portrait and FaceU...

window.orientation is not working in UIWebView

Hi, I am using 3.2 and 4.0 iOs and I am trying to run html file in UIWebView. the html file contains to following lines: var pwint = function(text) { var output = document.getElementById('output'); output.innerHTML = output.innerHTML + text + '\n'; }; var reorient = function(e) { pwint('Window Orientation: ' + window.orientation); ...

Android Browser orientationchange event keeps firing

Following is simple html, when viewed on android browser(nexus one) results into continuos orientationchange event chain when you change phone's orientation just once.<html><body> <script type="text/javascript"> window.addEventListener("orientationchange",function(){alert("test");},false); </script> </body></html>Can somebody please expl...

Android screen orientation bug

I am using android HTC HERO 2.1 version. The activity I write : <activity android:name=".gogogo" android:label="@string/app_name" android:theme="@style/Theme.mine" android:screenOrientation="landscape" android:configChanges="orientation"> let my orientation change to landscape. However, I figu...