All Questions

1144
votes
28answers
340535 views

Activity restart on rotation Android

In my Android application, when I rotate the device (slide out the keyboard) then my Activity is restarted (onCreate is called). Now, this is probably how it's supposed to be, but I do a lot of initia...
201
votes
16answers
127450 views

Why does an image captured using camera intent gets rotated on some devices on Android?

I'm capturing an image and setting it to image view. public void captureImage() { Intent intentCamera = new Intent("android.media.action.IMAGE_CAPTURE"); File filePhoto = new File(Environmen...
63
votes
15answers
73606 views

Best practices for circular shift (rotate) operations in C++

Left and right shift operators (<< and >>) are already available in C++. However, I couldn't find out how I could perform circular shift or rotate operations. How can operations like "Rotate Le...
252
votes
27answers
110933 views

Evenly space multiple views within a container view

Auto Layout is making my life difficult. In theory, it was going to be really useful when I switched, but I seem to fight it all of the time. I've made a demo project to try to find help. Does anyone...
108
votes
12answers
215480 views

Android: Rotate image in imageview by an angle

I am using the following code to rotate a image in ImageView by an angle. Is there any simpler and less complex method available. ImageView iv = (ImageView)findViewById(imageviewid); TextView tv = (T...
11
votes
3answers
14641 views

How to rotate an image gradually in Swing?

I have an image I am rotating when the user clicks on a button. But it is not working. I would like to see the image rotating gradually to 90 degrees till it stops but it doesn't. The image must rota...
73
votes
7answers
127805 views

CSS rotate property in IE

I want to rotate the DIV to a certain degree. In FF it functions but in IE I am facing a problem. For example in the following style I can set rotation=1 to 4 filter: progid:DXImageTransform.Micros...
53
votes
9answers
89647 views

Rotating a view in Android

I have a button that I want to put on a 45 degree angle. For some reason I can't get this to work. Can someone please provide the code to accomplish this?
40
votes
15answers
35802 views

JavaScript Array rotate()

I was wondering what was the most efficient way to rotate a JavaScript array. I came up with this solution, where a positive n rotates the array to the right, and a negative n to the left (-length &l...
3
votes
1answers
3683 views

Rotating a shape vertically around the x-axis

I have a 2d graph with an x and y axis and im trying to rotate a shape (series of points) around an axis. This rotation will need to include a scale function. import java.awt.*; import java.awt.event...

Previous Next