This is the code it displays the Canvas but is does not Refresh or Repaint it. What seems to be the Problem?
Using java Syntax Highlighting
- package com.google.android.graphicsapp;
- import android.app.Activity;
- import android.os.Bundle;
- public class GraphicsApp extends Activity implements Runnable
- {
- /** Called when the activity is first created. */
- Thread thread = null;
- GraphicsView graphicsView = null;
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- this.graphicsView = new GraphicsView(this);
- setContentView(this.graphicsView);
- this.thread = new Thread();
- this.thread.start();
- }
- public void run()
- {
- while(true)
- {
- this.graphicsView.invalidate();
- try
- {
- Thread.sleep(1000);
- }
- catch (InterruptedException e)
- {
- }
- }
- }
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4




