How Scrollview start position is not installed on the top of

In order to solve the conflict between Scrollview and listview set the listview height into the page is not at the top of the how to solve the situation

Started by Alvin at February 09, 2016 - 10:34 AM

`111

Posted by Alvin at February 23, 2016 - 10:41 AM

It will not ah··

Posted by Alvin at March 01, 2016 - 11:18 AM

= =! Why are fuzzy problems

scrollview.scrollTo(x,y);
listview.setSelection(int position);

Try this two method.. I hope a little help. . ZZZZ

Posted by Derek at March 09, 2016 - 11:27 AM

I still have this problem, help top!

Posted by Aimee at March 20, 2016 - 11:28 AM

Scrollview is nested inside a listview I by setting a method for setting the listview height is the case now I into the interface and not seeing the top but intermediate, can make the products can not ah.... Must want to let him show up is in the top
scrollview.scrollTo(x,y);
This method I tried XY settings have no effect ah 0, 0 or a large number have been tried in the invalid full what to most of the above methods the following invalid is also can be performed without error but no effect of solution

Posted by Alvin at March 30, 2016 - 11:44 AM

Scrollview is nested inside a listview I by setting a method for setting the listview height is the case now I into the interface and not seeing the top but intermediate, can make the products can not ah.... Must want to let him show up is in the top
scrollview.scrollTo(x,y);
This method I tried XY settings have no effect ah 0, 0 or a large number have been tried in the invalid full what to most of the above methods the following invalid is also can be performed without error but no effect of solution

Posted by Alvin at April 06, 2016 - 12:25 PM

In Baidu find a solution to the Scrollview and listview conflict example mean to use LinearLayout instead of listview in the middle of the mean by a resource array to initialize the LinearLayout column so that there will be a lot of line effect but I use here if not for the adapter data when the server is unable to determine the resolution to can't use this initialization method to resolve the ah, how can he show is on top

Posted by Alvin at April 14, 2016 - 12:43 PM

scrollview.scrollTo(x,y);
I try to scroll to the top

Posted by Eilian at April 28, 2016 - 1:12 PM

Solve
Runnable scrollViewRunable = new Runnable() {
@Override
public void run() {
((ScrollView)findViewById(R.id.main_sv)).scrollTo(10, 10) ;
}
};

mHandler.post(scrollViewRunable);

Posted by Abbott at May 04, 2016 - 1:40 PM

I also encountered this problem to find here, in fact, the solution is simple, does not require a thread like upstairs. As long as the rendering your ListView data, set the ScrollView:
((ScrollView)findViewById(R.id.main_sv)).scrollTo(10, 10) ;
Can be.
Why is Activity height calculation window is completed in the listview are not filled with data, so the ScrollView nested listview need to specify the height, otherwise will be in accordance with the layout defined in the default height calculation. Also, set the scrollTo position to fill the data after the completion of calls in the listview.

Posted by Sarah at May 08, 2016 - 2:38 PM

You solved? Now I have to struggle with this problem, and you're as like as two peas,, solving ah

Posted by Ailsa at May 15, 2016 - 2:43 PM

Hello, do you solve the problem? Please enlighten! Solving

Posted by Amber at May 17, 2016 - 3:25 PM

The same problem, seeking answers

Posted by Werner at May 19, 2016 - 4:10 PM

myScrollView.smoothScrollTo(0,20);

Posted by Ryan at May 25, 2016 - 4:19 PM

The 14 floor is good with

Posted by Joyce at June 03, 2016 - 4:29 PM

The 14 floor of the scheme can solve this problem.

Posted by Catherine at June 06, 2016 - 4:57 PM

14L positive solutions!

Posted by Miles at June 11, 2016 - 5:31 PM

14L awesome``

Posted by Olina at June 13, 2016 - 6:17 PM

The response to 2013-05-09 17:40:02 was removed by the administrator

Posted by Jason at June 24, 2016 - 7:02 PM

myScrollView.smoothScrollTo(0,20);Invalid, focus lv.setFocusable listview removed in the code(false);

Posted by Lyndon at July 06, 2016 - 7:24 PM

Not too should include ListView ScrollerView, this is not a good practice.
The first is the calculation of the ListView height is accurate (met before what is not so accurate, there is little error)? There is setting up ListView height, ListView itemView would be unable to reuse, i.e. ListView how many Item will create many ItemView, would be a waste of a lot of memory.
I think a more appropriate approach, should be using the ListView HeaderView or FooterView to achieve a similar effect.

Posted by Ellis at July 07, 2016 - 7:34 PM

Sometimes HeaderView can not be replaced.

Posted by Burke at July 08, 2016 - 8:06 PM

20 building temporary solution is perfect.

Posted by Burke at July 15, 2016 - 9:01 PM

Finally found the method, not for a long time, the 14 floor is good. . .

Posted by Kennedy at December 12, 2016 - 7:04 AM

14L really positive solution

Posted by Victoria at December 21, 2016 - 7:51 AM

Name tag, use next time

Posted by Vivian at December 30, 2016 - 8:50 AM

MyScrollView.smoothScrollTo positive solutions of 20L (0,20); lv.setFocusable listview is invalid, the focus is removed in the code.(false);

Posted by Cora at January 02, 2017 - 9:40 AM

I also encountered the same problem, completely positive solutions of 14 floor!!!! Top!!

Posted by Joe at January 07, 2017 - 8:59 AM

20, positive solution, thank you

Posted by Michell at January 08, 2017 - 10:30 AM

Second, 20 floor

Posted by Oprah at January 12, 2017 - 8:58 AM