[android-developers] How can we only rendering certain regions in SurfaceView

2011-05-25 Thread yccheok
I try to apply the similar technique found in Swing over Android's SurfaceView http://download.oracle.com/javase/tutorial/uiswing/painting/step3.html An important point worth noting is that although we have invoked repaint twice in a row in the same event handler, Swing is smart enough to take

Re: [android-developers] How can we only rendering certain regions in SurfaceView

2011-05-25 Thread Dianne Hackborn
To be honest, if you want something like the Swing behavior then don't use SurfaceView. The regular view hierarchy behaves more like Swing -- you call invalidate() on the rectangle that has changed, and the rectangles will be combined into a single draw operation down the view hierarchy. The