标签:color os 使用 java sp on 问题 代码 bs
============问题描述============
Canvas canvas = sfh.lockCanvas(null); canvas.drawColor(Color.BLUE);// 清除画布 sfh.unlockCanvasAndPost(canvas);
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); sfv = (SurfaceView) this.findViewById(R.id.SurfaceView01); sfh = sfv.getHolder(); // 此时还得不到画布的,canvas是null Canvas canvas = sfh.lockCanvas(null); canvas.drawColor(Color.BLUE); sfh.unlockCanvasAndPost(canvas); }
============解决方案1============
标签:color os 使用 java sp on 问题 代码 bs
原文地址:http://www.cnblogs.com/liangxieliang56/p/4083153.html