On default if you swipe from left to right you scroll to the left, and vice versa.
But I want to invert this action. so if you swipe left to right the scrollview goes to the right. Is there a XML solution or do I have to do this in code?
On default if you swipe from left to right you scroll to the left, and vice versa.
But I want to invert this action. so if you swipe left to right the scrollview goes to the right. Is there a XML solution or do I have to do this in code?
You could use a GestureDetector to listen for left/right swipes, implementing onScroll and/or onFling (probably both). This might work okay if you want to scroll the view by one contiguous item per gesture. You certainly could also implement continuous scrolling this way but I'd seriously consider whether this kind of interaction offers a good user experience. Usually on a touch device, the user would not expect scrolling to work this way around.
http://developer.android.com/training/gestures/detector.html http://developer.android.com/reference/android/view/GestureDetector.html
I am pretty unsure about this but something along these lines:
Code (not really):