• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

is it posible two way scrolling in android

 
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
shawn peter
Ranch Hand
Posts: 1325
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Steve
 
Let's go to the waterfront with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic