How to make a canvas blink and invariant to auto-rotate?
<p>I am trying to make a custom map application for Android. I have the map as an image and I want to show the user's position as a blinking rectangle. Here is the code I have written so far:</p>

<pre><code>public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    ImageView resultImageHolder = (ImageView) findViewById(R.id.test_image);
    layout = (FrameLayout) findViewById(R.id.frame_layout);
    draw();

 }

    private void draw() {
    int width = 200;
    int height = 200;

    Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_4444);
    bitmap.eraseColor(Color.TRANSPARENT);

    Paint paint = new Paint();
    paint.setColor(Color.BLUE);

    Canvas canvas = new Canvas(bitmap);

    canvas.drawRect(19, 11, 30, 19, paint);
    ImageView imageView = new ImageView(this);

    imageView.setImageBitmap(bitmap);

    layout.addView(imageView);

}
</code></pre>

<p>Now I need to make the canvas blink and also make the canvas stay in its correct position even if the screen auto-rotates. How can I achieve both things?</p>
