0

I have this problem that when the device screen is turned off, and my Timer triggers, I call ScrollView method smoothScrollTo.

However it does nothing, I am not getting onScrollChangedcallbacks at all. Is there any solution or workaround for this?

Thanks.

UdayKiran Pulipati
  • 6,579
  • 7
  • 67
  • 92
Niko
  • 8,093
  • 5
  • 49
  • 85
  • aren't you onPaused when the screen goes of ? in which case, onResume is called, and you may do your scrolling then. – njzk2 May 27 '13 at 08:53
  • just want to know, if your screen is off , then no visual effect needed, why do you want to call that method to scroll your view ? – toantran May 27 '13 at 08:53
  • The timer triggers no matter if the screen is on or off. So that's why smoothScrollTo, so if the screen is on user can see the smooth scroll there. – Niko May 27 '13 at 08:55
  • Relying in onResume here is an awful option, because that event can easily be triggered pressing home and back to the application. I would have to use extra boolean to determine if I need to apply the smoothScroll in onResume and I don't find that personally very good coding style to handle this kind of case. – Niko May 27 '13 at 08:58

0 Answers0