I want to lock Rotation functionality of Nokia N82 Device for my application.
Is there any attribute available for doing so?
How can i achieve this?
I have tried out Nokia-MIDlet-App-Orientation : portrait attribute. but cant get success.
Related
I've got a D3 app which uses force to display nodes and links. On my PC, the nodes respond to touch, but on my iPhone, they do not.
My code isn't open source (yet?), but in researching, I noticed this example also doesn't work on my iPhone like it does on my computer:
http://mbostock.github.io/d3/talk/20111116/force-collapsible.html
On the phone, I can drag the nodes; I can zoom in on the graph.. but if I tap the light blue circles, they don't become big blue circles as they do on my PC.
Using Chrome device mode, I tested several different emulated devices. Of the mobile devices, only the Nokia devices worked.
How can I get d3 nodes to respond to touch on mobile devices?
Hello it's possible to block, landscape view just for Smartphones, but not for Tab's or bigger devices?
It all depends on the container holding your webview.
In android you can block orientationchanges, even changes under certain conditions, on your activity. The overridable method "onConfigurationChanged(Configuration newConfig)" is responsible for this.
On iOS you can do this on the ViewController. This post describes how to do it: iOS 6 - How to run custom code when orientation changes.
It is also possible to do this from the configuration files of the project. For iOS you can block certain views for certain device types. With Android this is only possible to block landscape mode entirely.
If you are feeling adventurous, there is also the option to CSS-transform your view, though this is more of a hack than a real solution: Prevent orientation change in iOS Safari
I'm developing an application on a tablet using Silverlight out-of-browser with portrait orientation.
However, when the tablet is turned to landscape mode, the application also turns, and all the alignments are thrown off.
I found a post (http://stackoverflow.com/questions/8323318/wpf-orientation) that provides the solution for WPF, but the Microsoft.Win32.SystemEvents namespace is not available in Silverlight.
So is there any way I can lock my Siverlight OOB application to a single orientation?
Thank you!
In WPF you could provide a rotation layout transformation to the root container. It isn't actually locking the orientation but rather rotating your application. In Silverlight which as far as I know only supports render transformation, this would be much more difficult to do without other adverse effects.
I'm not aware of any public API to lock the screen orientation. Mostly because typically, Tablet PC manufacturers provided their own preinstalled utilities or drivers that used accelerometer data to change orientation. It was not a built in OS function. This may be changing in Windows 8.
How can I fire an event when orientation is changed on a mobile device.
onresize works fine on iPod Touch but not on mobile device using Opera mobile as browser.
Any help on how to fire event on Opera mobile.
Thanks,
Abhishek Jain
I've racked the web trying to find a good solution to this, I was in the same boat. There dosn't seem to be any really fantastic solutions out there, but what I use is this. Like I said not the best option, but mobile and mini Opera don't seem to fire anything catchable when the screen is resized. Since I'm looking at mobile devices I set the viewport to which ever (width/height) is smallest. When the user turns their device it will at least be kind of intuative.
Edit: I actually did this and coupled it together with a update width&height routine on my div's, based on screen.width/height, and it turned out pretty good.
How to handle screen motion of silverlight Windows phone 7 programmatically?
The motion of the phone screen is controlled entirely by the user. Whilst the device has an accelerometer which can be used to gauge motion in all three axes, it does not have any means of powering its own motion.
I would consider a couple of solutions:
Modify the hardware, perhaps add propellers to the handset. Quadrocopters are a popular configuration, giving both stability and maneuverability (they can even juggle!)
If hardware modification is not an option, you are going to have to rely on the user. I would suggest displaying a large arrow indicating to the user the direction you wish to move the handset in. You can achieve this with a single arrow image using a RotateTransform.
Hope that help.