I have an activity in which I have a camera preview.

I want noSensor|landscape orientation fixed for the activity so that the camera 
preview works with out any jerk during the orientation changes.

Now I don't get the orientation feedback from the Android which is good for the 
preview.

But I have some UI that has to respond to all 4 orientations.

The layout xml file is in portrait.

I listen to the sensor orientation changes in onOrientationChanged,I get the 
views by Id and move around the controls to simulate the orientation changes 
for the UI.

Now I face the problem particularly in displaying the scroll view with 
thumbnails of captured images.

The scrollview should be displayed horizontal always at the bottom of the view.

The idea is the activity will display the UI always in the portrait mode(as the 
layout it uses).

I have to rotate the ui controls to simulate the orientation changes.

I have a linearLayout container to which I add the ImageViews dynamically.

When I am in portrait mode I set the container's orientation to horizontal and 
add the linear container to a horizontal scrollview so that it scrolls 
horizontally.

when I have to simulate the landscape orientation I change the orientation of 
the linear container to vertical , remove it from the horizontal view and add 
the container to a scrollView so that it scrolls vertically.

This approach works fine for portrait and landscape but during the reverse 
landscape and reverse portrait modes, the scrollview should display elements 
from bottom to top and the horizontal scrollview should display from right to 
left.

I have changed the alignment of the container which is doing the job but the 
scrollview scrolling lint is fixed to the bottom.

I want to scroll downwards during landscape mode(with the first image on the 
top and last image in the bottom) and scroll up during the landscape 
reverse(with the first image at the bottom and the last image in the top).

I need a way to reverse the limits of the scrolling for the reverse 
modes(Landscape rev and portrait rev).

Please help.
http://stackoverflow.com/questions/12086235/is-it-possible-to-rotate-a-scrollview-programmatically-in-android

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to