0

I want scroll to scrollview

But in scrollview i have invisible item

I want after visible items , scrollTo new position by new height

My code:

lst.setVisibility(View.VISIBLE); // lst item in Roll
ScrollView Roll = (ScrollView) findViewById(R.id.Roll);
Roll.smoothScrollTo(0, newPosition);
Mohammad
  • 197
  • 3
  • 12
  • What's the value of newPosition? How do you calculate it? – Javi Mollá Mar 04 '15 at 13:18
  • My scrollview before visible child is : 600dp and after visible child is 1200dp. i want scroll to 1000dp ( newposition ) but my app scroll to 600 because not added new size to scrollview – Mohammad Mar 04 '15 at 13:53
  • What are the layout params of ScrollView? Post the xml also with the child of the ScrollView (ListView if it's that) – Javi Mollá Mar 04 '15 at 13:59
  • Scrollview default fill.parent and in scroll view is textview and listview ( visibilty gone ) – Mohammad Mar 04 '15 at 14:30
  • Scrollview can only have one direct child: http://stackoverflow.com/questions/4259607/if-scrollview-only-supports-one-direct-child-how-am-i-supposed-to-make-a-whole? – Javi Mollá Mar 04 '15 at 16:16

0 Answers0