problem about device-orientation-Collection of common programming errors
user1129655
android android-imageview device-orientation
Below code is to create imageviews dynamically and add to its parent layout on click of a button. This works well. When i change the device orientation, everything is vanishing. i.e, After adding images if i change the device orientation the added images are missing. Why? How can i get back my images after changing the device orientation also? @Override public void onClick(View v) {//create an imageviewImageView img = new ImageView(getApplicationContext());//set layout parametersimg.setLayout
sandeep
android orientation screen-orientation android-orientation device-orientation
I have a application ,where I am using Landscape and potrait mode. I have used android:configChanges=”orientation|keyboardHidden” in my every activity. So When I run this on device 2.3 its completely working fine and the activity is not restarted. But When I open the same application in android 4.0 and above the activity gets restarted whenever a orientation is changed.Here is my xml file.<?xml version=”1.0″ encoding=”utf-8″?> <manifest xmlns:android=”http://schemas.android.com/apk/res
Max MacLeod
ios iphone autolayout device-orientation auto-rotation
I am developing an application which supports portrait and landscape modes. I am using auto layout to arrange my views. As i have been reading many posts and i have realized that developers commonly use one among the following approaches.1. First approach:Implement the UIViewController::update constraints method and update constraints according to device orientation.2. Second approach:Implement the UIViewController::viewWillLayoutSubviews method and update constraints according to device orienta
Sim
ios static-libraries device-orientation
I am using a static library in my ios app which gives me a UI through which a user can be authenticated.this static library, does not support any rotations of the device.I got the source of the library and I have included the statement- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; }in its viewcontroller that generates the UI.How can I solve this problem ?
Lukas Knuth
android device-orientation orientation-changes
As far as I’ve understood, your Android activity will be recreated for the new orientation on any orientation changes.Is there a way to store / save some of the data from the original orientation upon the orientation change?I’d like to store some Bitmaps, so I don’t have to load it again on the orientation change.
JFS
ios uiviewcontroller device-orientation
my app is doing calculations and showing the results in a graph. When the device is rotating a new UIViewController is generated showing the graph in a landscape-oriented view. Therefore necessary parameters are passed to the new ViewController to create the graph. The app is crashing when the device is turned to landscape when the calculation is still running.Is there a proper way to disable the used DeviceOrientationNotification temporarily?-(void)calculate {disable DeviceOrientationNotificati
clopez
objective-c portrait device-orientation unrecognized-selector
Right now my app should only supports Portrait. On Summary/Supported Device Orientations I have only selected Portrait so I’m hoping that my app will not rotate. I was testing the app on a device and suddenly I’m getting the following error randomly:[UIButtonContent deviceOrientationDidChange:]: unrecognized selector sent to instanceIt happens when I rotate the device SOMETIMES, is not consistent, and is not always over UIBUttonContent. I supposed that if I only select Portrait, deviceOrientatio
Alexander Sharunov
ios cocoa-touch automatic-ref-counting device-orientation
I’ve got the Cocoa Touch project with ARC and this error sometimes occurs. Can You explain me the kind of this error and the way to solve this?-[__NSCFString deviceOrientationDidChange:]: unrecognized selector sent to instance 0x1ddf81a0*** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSCFString deviceOrientationDidChange:]: unrecognized selector sent to instance 0x1ddf81a0’ *** First throw call stack: (0x313132a3 0x38fad97f 0x31316e07 0x31315531 0x3126cf6
briggsm
android in-app-billing illegalstateexception device-orientation
I implemented In-app Billing (v3) according to Android’s Implementing In-app Billing guide.All works fine, until I rotate the device, then immediately rotate it back to it’s original orientation. Actually, sometimes it works, and sometimes it crashes with:java.lang.IllegalStateException: IabHelper was disposed of, so it cannot be used.Seems this is related to the asynchronous nature of IAB, though I’m not positive.Any thoughts?
sirab333
iphone ios6 orientation device-orientation
THIS IS NOT A DUPLICATE QUESTION. A final working solution has NOT been provided yet. Please do not CLOSE this question until I have accepted an answer or found and provided my own solution for this. Thanks!================================================================== Using Xcode 4.5.1, I have a tab-bar app with 5 tabs in it. Each tab contains a UINavigationController. The entire App thus needs to be viewed in Portrait mode with the exception of one sole ViewController – a “modal” VC that
Tom
ios xcode device-orientation mobfox
Im struggling with this one.I have an app that is designed to run in portrait and all is well. However i have implemented Mobfox’s vAds which require landscape mode.At present i get the following error when the vAD is called2013-01-08 23:44:05.109 Tv – IOS[1422:907] mobfox video did load 2013-01-08 23:44:05.125 Tv – IOS[1422:907] *** Terminating app due to uncaught exception ‘UIApplicationInvalidInterfaceOrientation’, reason: ‘Supported orientations has no common orientation with the application
user2155738
javascript html5 device-orientation uideviceorientation
Well I’ve got this little script:<script> window.addEventListener(‘deviceorientation’, function(event) {var a = event.alpha;var b = event.beta;var g = event.gamma; }, false); </script><script> setInterval(‘alert(“”+g+””);’, ‘1000’); </script>Which should add the deviceorientation, attach it to the page, and alert every 1 second what the orientation currently is, the gamma.It’s not working, though? Nothing alerts! any tips… ideas…?Edit: I get “Uncaught ReferenceError:
Ant4res
android orientation screen-orientation device-orientation
I would like to find out the detailed orientation of a device, preferably one of SCREEN_ORIENTATION_LANDSCAPE, SCREEN_ORIENTATION_PORTRAIT, SCREEN_ORIENTATION_REVERSE_LANDSCAPE, SCREEN_ORIENTATION_REVERSE_PORTRAIT from ActivityInfo or equivalent.Some of the answers here on StackOverflow includedgetWindowManager().getDefaultDisplay().getRotation()but this doesn’t really tell me whether the device is in portrait or landscape mode, only how it’s turned with reference to its natural position – which
Web site is in building