Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Help on the scrolling Bar in Android?

 
Sankar GaneshB.E
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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]
 
sanjay krishnan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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);

}
});
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic