File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes is it posible two way scrolling in android Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "is it posible two way scrolling in android" Watch "is it posible two way scrolling in android" New topic
Author

is it posible two way scrolling in android

sam liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 1085
I need to have scroll bars both horizontal and vertical.how to archive this requirement ?I have already HorizontallScrollview in my project.So how to add vertical scroll bar to this ?
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4176
    
  21

There is no built-in view to do this. From a design point of view, it is encouraged to build your application so it only has to scroll one way because it is a better user experience. So I would suggest you attempt to modify your design to present your data in one screen either wide, or one screen tall, so you only need to scroll one way (and use the views that work that way.)

That can't always work, obviously. If you find yourself in need of two way scrolling:
1) You could nest a ScrollView in a HorizontalScrollView, but this leads to poor UX (no diagonal movement, hard to predict which scroll view will do the scrolling, etc...)
2) You could use a custom implementation that takes care of all the above. The one I see referenced most often is this: http://blog.gorges.us/2010/06/android-two-dimensional-scrollview/ but I have never used it.


Steve
sam liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 1085
Thanks Steve
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is it posible two way scrolling in android