I tried to use HorizontalScrollView methods such as scrollTo(), fullScroll() when I draw my custom view, it can scroll to a specified coordinate. I still have the following questions: 1. Does the y argument in the method scrollTo(x,y) make any sense? 2. If I implement the initial offset in the custom view's onDraw() method, it will be invoked any times when the custom view to be drawn. Is it reasonable?
Thanks. On Jun 22, 2:47 pm, zhangxiyuan <[email protected]> wrote: > Hi, > > I searched the groups to find a topic about setting horizontal scroll > view'soffset, but no results. > Some topics talked about ScrollView, and they are not expected. > > Here is my question: > I have aHorizontalScrollView, with LinearLayout as its child, the > LinearLayout contains a custom view, I finished the onDraw method of > the custom view to draw something which is longer than the screen's > horizontal size, so I thinkHorizontalScrollViewis the right widget > that I need. > But I do not want to display the left-most part of my custom view, > such as a calendar, I can display the last week and next week in the > custom view, but what I want to put in the center of the scroll view > is today. > > So, I wonder how I shouldsettheinitialoffsetof theHorizontalScrollView? > > Any help will be greatly welcomed. > Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

