title: Change Background at specific interval
body: <p>I have to change background image at every 30 seconds but i am not getting proper result</p>
  
  <p>I have tried with thread and TimerTask. but no work.
  I have port1, port2...etc images.</p>
  
  <p>In TimerTask background is gone.</p>
  
  <pre><code>class Task1 extends TimerTask {
      public void run() {
          System.out.println("Checking a");
          Random r = new Random();
          int i = r.nextInt(3) + 1;
          rl.setBackgroundResource(getResources().getIdentifier(
                      "port" + i, "drawable","com.samcom.breakingdowncd"));
  
      }
  }
  
  Timer timerBackground = new Timer();
  timerBackground.scheduleAtFixedRate(new Task1(), 0, 30000);
  </code></pre>
  
  <p>Its not working, any help will be appreciated.
  Thanks</p>