gallery stopped event

  • Replies:6
mcfly
  • Forum posts: 286

Aug 21, 2010, 11:12:05 AM via App

how can i determine when a gallery has stopped after sliding throught the pictures. I only want tocload a big text when the user stays on q picture. if i woild load big texts on every onselecteditem event it would slow down pwrformance. any guess ?

I could use the setCallbackDuringFling(false) , then only the OnItemSelectedListener would only be called if the Gallery has stopped. But I need this listener to make some little updates while the Gallery is sliding. If its stoppe I should make a big update. How can I find out in the OnItemSelectedListener if my Gallery i stopped ?


regards mcfly

— modified on Aug 21, 2010, 3:25:50 PM

Reply
mcfly
  • Forum posts: 286

Aug 29, 2010, 1:12:10 PM via App

thanks if found a solution for this. because its a hack i better not publih my solution.

Reply
Jeremiah
  • Forum posts: 775

Sep 2, 2010, 9:29:42 AM via Website

Sorry for not posting sooner, I'm not very good at programming with ui elements. But is it possible to use 2 listeners? Set one to false and load your big texts in it when the gallery has stopped. And leave the other listener true, and load your small updates there. Let me know if it works.

— modified on Sep 8, 2010, 7:18:04 AM

Reply
Jeremiah
  • Forum posts: 775

Sep 8, 2010, 7:18:41 AM via Website

Any luck getting it working like you wanted?

Reply
mcfly
  • Forum posts: 286

Sep 8, 2010, 7:55:30 PM via App

i did it in another way. i created a handler which displays my big text. in the onselectitem listener i startup a thread which checks the miliseconds passing by until the next onselectitem event occures. if that time is a half second i call the handler. that works for me. thanks to all who helped me. regards

Reply