Android SurfaceView使用 笔记(2)

int run = 10;
    @Override
    public void run() {
        // TODO Auto-generated method stub
        try{
            while( run-- > 0){
              
                draw();
              
                Thread.sleep(1000);
            }
        }catch(Exception e){
            e.printStackTrace();
        }      
    }
}

Activity 中  的onCreate(Bundle)

public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);
}

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/pxdyp.html