Hi there!
I have an APP with a bunch of HorizontalScroll on many Activities, to emulate a image carrousel.
That said in my main view, I have this carrousel with a bunch of key images (people) that onClick event will fire another Activity to display more details about it. I do that using CallSubDellayed, calling a method Show.
The activity starts, pass through the ActivityCreate and executes the Show method like charm.
So, what happens? In the Show method I used to call my Scroll.ScrollPosition(Index * Activity.Width), where Index it's the image that was clicked before.
After that, I used to call DoEvents. Perfect, it works, although after a while my APP starts to become too slow, and some Samsung devices, send to the user an advice to close the APP once they're consuming too much battery/CPU. Dang... The clients start to call the support complaining about that.
Okay, after a bunch of research, we found out that we should avoid the use of DoEvents at all. And once we're using the Scroll, it's highly recommended to call Scroll.ScrollToNow(parameter) instead of ScrollPosition + DoEvents.
We tried that without success
The scroll doest not change to the right position. It moves just a little and does not complete all the rotation that is desired. If we include a DoEvents call on it, it works.
But again, I started to receive those alerts from that Samsung Monitor App.
Any thoughts about how to solve/improve that?
Thanks.
I have an APP with a bunch of HorizontalScroll on many Activities, to emulate a image carrousel.
That said in my main view, I have this carrousel with a bunch of key images (people) that onClick event will fire another Activity to display more details about it. I do that using CallSubDellayed, calling a method Show.
The activity starts, pass through the ActivityCreate and executes the Show method like charm.
So, what happens? In the Show method I used to call my Scroll.ScrollPosition(Index * Activity.Width), where Index it's the image that was clicked before.
After that, I used to call DoEvents. Perfect, it works, although after a while my APP starts to become too slow, and some Samsung devices, send to the user an advice to close the APP once they're consuming too much battery/CPU. Dang... The clients start to call the support complaining about that.
Okay, after a bunch of research, we found out that we should avoid the use of DoEvents at all. And once we're using the Scroll, it's highly recommended to call Scroll.ScrollToNow(parameter) instead of ScrollPosition + DoEvents.
We tried that without success
The scroll doest not change to the right position. It moves just a little and does not complete all the rotation that is desired. If we include a DoEvents call on it, it works.
But again, I started to receive those alerts from that Samsung Monitor App.
Any thoughts about how to solve/improve that?
Thanks.