Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop scrolling screen to top on selection of spinner in android

I am using spinner in scroll view, when I do selection of spinner, scroll view is scrolling to top of screen. Is there any way to prevent this scroll?

Any help is appreciated.

Thanks.

like image 537
Mitesh Sardhara Avatar asked Oct 11 '12 13:10

Mitesh Sardhara


1 Answers

All

For above my issue I have set one property for scrollview in xml.

android:descendantFocusability="beforeDescendants"

And it has worked for me like a charm.

I have found solution here

Focusable EditText inside ListView

https://stackoverflow.com/a/2680077/1556997

Thanks all for the help.

like image 125
Mitesh Sardhara Avatar answered Sep 17 '22 19:09

Mitesh Sardhara