Slicing a Picture
I have a
Picture pic = webView.capturePicture();
which is potentially huge and needs to be sliced into multiple chunks that will fit the screen.
The naive thing I'm currently doing isBitmap bm = Bitmap.createBitmap(screenWidth开发者_如何学Python, screenHeigth, RGB_565);
Canvas canvas = new Canvas(bm);
canvas.drawPicture(pic);
fullScreenImageView.setImageBitmap(bm);
What would be the efficient way to "paginate" the Picture
to be displayed on screen (these "pages" will be later replacing one another)?
Can't you just call getDrawingCache() on the webView? You won't be creating any new bitmap because it is the cache of the webview which is uses to scroll.
精彩评论