Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

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);

}
});
 
girl power ... turns out to be about a hundred watts. But they seriuosly don't like being connected to the grid. Tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic