将大图片放在btimap里,然后滚动需要多大就在bitmap里截取多大出来显示,这个是2D游戏经常用的方式。 @Override public void onDraw(Canvas canvas) { // Draw a bitmap to the canvas at 0,0 canvas.drawBitmap(mBitmap, 0, 0, null); // Add in your drawing functions here super.onDraw(canvas); // Call invalidate to draw to screen invalidate(); }
我想请问各位有没有什么好办法或者好的第三方框架处理我的问题,谢谢了!!
我也不会,帮你顶一下吧
@Override
public void onDraw(Canvas canvas) {
// Draw a bitmap to the canvas at 0,0
canvas.drawBitmap(mBitmap, 0, 0, null);
// Add in your drawing functions here
super.onDraw(canvas);
// Call invalidate to draw to screen
invalidate();
}