Android :: Get Rotation Of Device In Four Main Orientations / Disable This For App?
Nov 22, 2010
How can i get the rotation of the device in the four main orientations? and is there a corresponding event that i can capture?
also, is it possible to disable this rotation for my app?
View 1 Replies
Aug 20, 2009
I have a apk file, where i dont have the source for it.
When i run the apk, it automatically rotates the screen,
/WindowManager( 879): Setting rotation to 1, animFlags=0 I/WindowManager( 879): Config changed: { scale=1.0 imsi=0/0 locale=en_US touch=1 key=2/1/2 nav=3 orien=1 }
then after closing the application or coming out from the application,
I/WindowManager( 879): Setting rotation to 0, animFlags=0 I/WindowManager( 879): Config changed: { scale=1.0 imsi=0/0 locale=en_US touch=1 key=2/1/2 nav=3 orien=2 }
how to disable the rotation.
View 2 Replies
View Related
Jul 7, 2013
Ok... So, is there anyway to force rotation-lock to turn off on a Nexus 7 with Android 4.2.2?
Reason: I cracked my screen from the bottom left of the screen to just shy of the top right corner. The lower section, below the crack, is not responsive to touch... and the dots I need (I use the pattern pass) are on this side because I can't flip the tablet.
How This Happened: I turned on rotation lock with the tablet upside down to keep it there... But then my Nexus 7 decided to restart randomly and keep rotation-lock on but coming back in the default orientation, aka the wrong way that I need it to be.
View 1 Replies
View Related
Feb 22, 2012
it is possible to code an app so that it does not rotate if/when the user rotates their device. I have built an app that is designed for portrait view only. When it is flips to landscape, it gets distorted. I have apps on my android that do not rotate when I try to rotate my device.
I am using Eclipse to make my app. I'm hoping it is something that I need to add to the manifest.
View 1 Replies
View Related
Jul 20, 2010
Is there anyway to disable this in the messaging app because i like portrait for messaging since i have no lag there, but i do like to type in landscape on the browser. Am rooted running darchdroid 2.7 if it matters.
View 1 Replies
View Related
Jul 9, 2010
I want to disable the view change on device rotation for the time being. Its giving foreclose error when i rotate the device and starts all over again.
View 3 Replies
View Related
Jul 16, 2010
Was wondering if it were possible to have it set so that Swype would be the default keyboard for portrait & whenever you switched to landscape, the default Android keyboard would pop up as the default?
I did read this post here & was wondering if the info still stands. Figured I'd start a thread here since my question's not Incredible-specific.
View 5 Replies
View Related
Apr 7, 2009
Let's assume i got two activities "Main" and "Sub" Activity "Main" is forced into portrait orientation using setRequestedOrientation At some later point "Main" runs "Sub" using startActivityForResult.Somehow "Sub" also starts in portrait orientation while i would expect the call to setRequestedOrientation only to affect the calling activity.How do i get "Sub" to respect the system orientation while keeping "Main" locked in Portrait?
View 8 Replies
View Related
Sep 4, 2010
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.
View 1 Replies
View Related
Jan 23, 2010
I've seen references to being able to specify two separate layout xml files for an activity, one for Portrait and one for Landscape. I've not been to find any information on how to do that though. How do I specify for each activity which xml file is it's portrait layout and which is the Landscape layout? Is it also possible to specify different layouts for different screen sizes? If so, how is this done?
View 2 Replies
View Related
Aug 29, 2010
I am finding that my layouts tend to look great in one orientation but if I change the phone's orientation, things are a mess. For example on one screen I have 6 large buttons that look great in portrait orientation but if the user changes phone orientation, those buttons get cut off in portrait.
Do I need to code two layouts for every screen - one for portrait and one for landscape? That would be such a waste of time.
View 1 Replies
View Related
Aug 4, 2010
How does Android handle scaling of a video being played within a VideoView?
So for example if I have a video that is say 480 X 270 (width and height), aspect ratio 16:9. And, say the VideoView is added to a LinearLayout with LayoutParams of (480, 270). What will be width and height of the rendered video in portrait orientation in a device that is 320 X 480? In landscape? In another device that is 320 X 550?
View 1 Replies
View Related
Jun 14, 2010
From what I've tried, the EVO only has portrait and left-oriented (aka turn the phone on its left side) landscape viewing. Is there any way to enable right-oriented landscape viewing (aka turn the phone on it's right side)? It is very difficult to hold the phone in left-landscape when it's charging and nearly impossible to type with two hands.
View 5 Replies
View Related
Jul 22, 2010
Is it possible to programmatically disable and enable the led indicator light on an Android device? I am not referring to just turning it on and off as in a notification. I did not see anything in the api that would do so. I am guessing this is hardware specific if it is possible at all.
View 1 Replies
View Related
Aug 7, 2010
I have htc evo 4G with sprint and this is the software information
droid 2.1-update1
baseband: 2.05.00
Kernel: 2.6.29
software number: 1.47
PRL version: 60667
and i've been trying to root this so i can use other application and wifi tether however everytime i tried i always get this error " MAIN FOLDER IS OLDER , MAIN UPDATE FAIL!"
I used unrevoked - does not work then i restore to factory setting THEN i tried simpleroot get message Main Folder is older, main update fail!. I also have tried to do Restart the PHONE and press the power button and hold the volume button up (but i have upload the PC36IMG.ZIP before i reboot) THIS does not work either get same message.
IF anyone can help me with this root and PM me your PAYPAL i willing to pay $10 to give me detail instruction (step by step how to get this root)
After rooter i need to know if possible to update somehow to get my FLASH working or it have to be update to droid 2.2 (if i update to 2.2 after rooted, will it lose all my rooted previously assuming its already successfully rooted)
View 4 Replies
View Related
Dec 18, 2012
How do you disable the ICS screen lock ring but leave the pin device lock on?
View 4 Replies
View Related
Jul 13, 2010
im new to the android and the forum. i need some help with google sync/gmail sync. i have synced my contacts once but i do not want to sync it anymore how do i disable contacts and calender sync on my android device now?
View 5 Replies
View Related
Feb 19, 2010
I would like to temporarily disable the Android device when the user performs 3 wrong logins in a row. The login is another issue I'm not interested in here. I'm interested in blocking the phone. I've been searching for some time now. I found some messages on disabling buttons, but they seem to be bad usability. On top of that, it might not be supported anymore in future APIs. So I kept looking and found:
http://developer.android.com/reference/android/Manifest.permission.ht....
This seems to suggest something in the API that I can use, but can't find it. I'm interested in how to use this permission, and I'm also interested in what the consequences are. Does using some bricking method imply that the phone is permanently bricked, or is there still a way to restore the phone, so you don't have to throw it away?
View 3 Replies
View Related
Feb 8, 2010
I have a problem with rotation, during my ListActivity is loading data from the network. To do it I use a background thread which recovers data and put them inside an ArrayList. While this thread works, there is Progress dialog activated in foreground. For the rotation I use the method with onRetainNonConfigurationInstance() to save my ArrayList's state. After android calls this method, I call dismiss() on the progress dialog on onStop(). Then the activity is created as new with onCreate(), but it use the getLastNonConfigurationInstance() to recover the ArrayList's state. Now, my problem. If I rotate from portrait to lanscape when the download is terminated and I see the data in portrait yet, everything is ok. If I rotate during progress dialog is showing I have two cases: 1- onRetainNonConfigurationInstance() saves the arraylist fully recovered, the thread terminates and everything is ok. 2- onRetainNonConfigurationInstance() saves the arraylist empty, i think the download isn't finished yet. The onCreate is called and my list is empty, the thread terminates, but i don't see anything in my list. If I am in this case and I still rotate from landscape to portrait now I can see my list full with all the data. Why? Where am I wrong?
View 7 Replies
View Related
Nov 24, 2011
how to rotate fragment in android 3.0.I have an activity in which there is listfragment and fragment.on click of the item in list i want to apply rotation for the fragment.I have tried with below given code:
ObjectAnimator.ofFloat(getView(), "rotationY", 0, 360).setDuration(500).start();
This code works well witn listview in listfragment but when i used the same for fragment rotation it throws exception.
View 1 Replies
View Related
Mar 30, 2010
I've got an app where I don't want the screen to rotate when they rotate their device, I need to keep the app in portrait mode all the time. How do I do this?
View 2 Replies
View Related
Sep 20, 2010
How should I handle an active ProgressDialog when the screen is rotated? Perhaps I should cancel the dialog in onDestroy and restart it in response to a SavedInstanceState flag?
I'm getting an exception and the following message in logcat:
CODE:..............
View 7 Replies
View Related
Sep 10, 2010
Is there a standard pattern for handling a running AsyncTask with screen rotation? My AsyncTask runs for about 10 seconds. I could call AsyncTask.cancel in the Activity's onDestroy method and restart the task in onCreate but that would waste cycles, bandwidth, and user time. I'm guessing there is a better way.
View 1 Replies
View Related
Nov 22, 2010
In my Android app I have 2 layouts, one for portrait and one for landscape.
In both layouts I have a TextView that the user can change by clicking on, by default it reads 'ON'
If the user presses it then it changes to 'OFF' All well and good.
However if it's set to OFF and the screen is rotated the text view resets to ON. How can I stop this from happening?
View 1 Replies
View Related
May 18, 2010
I need to calculate a rotation vector out of the data i get from Sensor.TYPE_ORIENTATION. The sensor data is defined like this: the values have to be recalculated to become a correct 3d position: values[0]: Azimuth, angle between the magnetic north direction and the Y axis, around the Z axis (0 to 359). 0=North, 90=East, 180=South, 270=West values[1]: Pitch, rotation around X axis (-180 to 180), with positive values when the z-axis moves toward the y-axis. values[2]: Roll, rotation around Y axis (-90 to 90), with positive values when the x-axis moves away from the z-axis need all three values like the Z axis value (from 0 to 360 degree). I tried a lot but cant figure out how to do this :/ So i bet there is a simple solution how to recall the values of sensor.TYPE_ORIENTATION to make them a 3d rotation vector, but i just dont know how to do it. If you know the answer please tell me. Code...
View 3 Replies
View Related
Jul 14, 2009
In the api demo, there is an example for how to rotate a cube, but it can only rotate about X axis or Y axis, without Z-Axis Rotation. So how to perform 3D Rotation?
View 5 Replies
View Related
Feb 23, 2010
I spend two weeks now trying to get this working with no success. Here is what I want to do: I have several geo points around the user and his phone. I want to display this point overlaying them on the input from the camera (kind of standard AR (Augmented Reality) app). Part of my requirements are that the user can use the phone in either landscape or portrait mode.My plan was like this.
1. Register for Sensor.TYPE_ACCELEROMETER, Sensor.TYPE_MAGNETIC_FIELD 2. Pass the result to Sensor Manager.getRotationMatrix(), getting back the R matrix that should be telling me how to translate points from the Phone coordinate system (defined here: http://developer.android.com/reference/android/hardware/SensorEvent.html) to World coordinate system (x -> East, y -> North, z -> Sky) 3. I want to translate points from World to Phone so I take the inverse of R (I'm using Matrix.invertM()) to get R_In 4. Using the GPS I translate the geo points I want to display on the camera to points in the World coordinate system and then I run them through the R_In matrix to get their coordinates in the Phone system. 5. Draw the points in the screen only if the have (phone coordinates) z < 0 and x and y such that they are visible. This is my grand plan... however I have problems quite early (2). I do get the R matrix back and it looks good when I align the phone to the world coordinate system ( I get the identity matrix ). However when I try to translate an imaginary point from the Phone coordinate system say (0, 1, 0) to the World coordinate system I don't get the numbers I expect.
View 2 Replies
View Related
Oct 21, 2009
My application while compiled in 1.5 works fine. I had some memory issues w/ 1.6 due to image size, which was strange b/c the image size increased when taking photos by taking a picture w/ surfaceholder/imagecapture callback. I seem to have fixed re-displaying those images by resizing them using a bitmapfactory matrix. But my camera is now rotating everything 90 degrees. It appears that my Override of surfaceChanged does nothing, which is where I was setting rotation at 90 (I can't remember why, it was 10 months ago!). I have tried at rotating the camera parameters paramters at 90 degrees, 0 degrees.
View 2 Replies
View Related
Sep 16, 2010
Step #1: Make it a static inner class
Step #2: Manually associate your activity with the task in its constructor
Step #3: Return the task object from onRetainNonConfigurationInstance() of your activity
Step #4: In onCreate() of your activity, check getLastNonConfigurationInstance(), and if it is not null, associate your new activity instance with the task via a setter
Step #5: Use the activity within onPostExecute()
View 3 Replies
View Related
Nov 24, 2010
does anybody knows how to launch a new activity with rotation animation.That I would like to know if there is a way to do the same but instead of image, i will be activity (whith new layout).
View 1 Replies
View Related