• 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

Need Help on the scrolling Bar in Android?

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created a simple application which has a scroll bar as

shown in image attached. The scroll bar has 5 textviews such as AllArticles, Top10 and so on , also the scroll bar has 2 arrow images, when i click the arrow image the textviews has to be scrolled. can any one help me regarding on this, i am struggling on this.
the code is
device.png
[Thumbnail for device.png]
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use below fucntion

boolean android.widget.HorizontalScrollView.arrowScroll(int direction)

For eg:

leftview.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
horview.arrowScroll(View.FOCUS_LEFT);

}
});
rightview.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
horview.arrowScroll(View.FOCUS_RIGHT);

}
});
reply
    Bookmark Topic Watch Topic
  • New Topic