Q:

Android OnDraw() and update with Timer

I'm trying to make a game in Android that once a user presses start, there will be objects flying across the screen.  I think I need to link my OnDraw() function with a timer so that the objects' positions can be updated.  
Currently, I am following a code sample I found online that prints out the text continuously. 
However, I can't import java.awt.event. ActionEvent and ActionListener.  Eclipse is giving me a "The import java.awt.event cannot be resolved".  Is there an Android equivalent to ActionEvent? 
Or is this done some other way?  Thank you. 
import java.awt.event. ActionEvent;
import java.awt.event. ActionListener;

import javax.swing. Timer;

public class TimerSample {
  public static void main(String args[]) {
    ActionListener actionListener = new ActionListener() {
      public void actionPerformed(ActionEvent actionEvent) {
        System.out.println("Hello World Timer");
      }
    };
    Timer timer = new Timer(500, actionListener);
    timer.start();
  }
}

A:

Use the Timer which android provides and for a from the scratch tutorial, check out this.