Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. /////////////////////
  2. /////// timer ///////
  3. /////////////////////
  4. private void runTimer() {
  5.  
  6. myTimer = new Timer();
  7. myTimer.schedule(new TimerTask() {
  8. @Override
  9. public void run() {
  10. TimerMethod();
  11. }
  12.  
  13. }, 5000, 5000);
  14. }
  15.  
  16. private Runnable Timer_Tick = new Runnable() {
  17. public void run() {
  18.  
  19. // next image if THIS one is loaded
  20. nextImage();
  21. }
  22. };
  23.  
  24. private void TimerMethod() {
  25. getActivity().runOnUiThread(Timer_Tick);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement