Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to bring clicked item as leftmost item

 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using http://www.dev-smart.com/archives/34 to get horizontal list view.I need to scroll the selected item left and show it as leftmost item of the visible items.how to archive this?
 
ibrahim yener
Ranch Hand
Posts: 202
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to use scrollTo() method.

This method takes two parameters X and Y where stands for x,y coordinate of screen View.scrollTo(0, 0) will take you top-left corner of the screen.

For more detail : http://developer.android.com/reference/android/view/View.html#scrollTo%28int,%20int%29
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic