I have a Scrollview and items ( EditTexts, TextViews and Spinners ) inside it. So when I programatically update values in EditTexts Scrollview automatically scrolls to the top. The question is how can I prevent that autoscroll ?
Asked
Active
Viewed 592 times
1
-
1kindly check while updating the values the focus is on which component? – Ronak Thakkar Jul 10 '17 at 07:12
-
1so use `scrollTo`, https://stackoverflow.com/a/38438576/5241603. – K.Sopheak Jul 10 '17 at 07:25
-
1set `isFocusable()` false to the items that you update the value in the last – cpt. Sparrow Jul 10 '17 at 07:32
-
Thank You all, will try all answers now :) – abrutsze Jul 10 '17 at 07:39
1 Answers
0
use scrollview.setEnabled(false) before update values in EditTexts and after update scrollview.setEnabled(true)

Rasoul Miri
- 11,234
- 1
- 68
- 78
-
I do not think that it is possible, since EditTexts get updated automatically ( ~ every second ) when sensor values get changed. – abrutsze Jul 10 '17 at 07:18