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 Need Help on the scrolling Bar in Android? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Need Help on the scrolling Bar in Android?" Watch "Need Help on the scrolling Bar in Android?" New topic
Author

Need Help on the scrolling Bar in Android?

Sankar GaneshB.E
Greenhorn

Joined: Aug 31, 2010
Posts: 5
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


[Thumbnail for device.png]

sanjay krishnan
Greenhorn

Joined: Jan 27, 2008
Posts: 2
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);

}
});
 
 
subject: Need Help on the scrolling Bar in Android?