Hello,
I have an ImageView whose background is set to a drawable using
setBackgroundDrawable. On top of this ImageView is a custom view which
utilizes a Bitmap to allow the user to draw/paint. Currently the
Bitmap "captures" the background drawable so that every time the
onDraw method is called (which is frequently) the Bitmap with the
background image drawn onto it are constantly redrawn on the screen
thus creating a lot of lag (the tail of the paint is slow following
the user's finger).
protected void onDraw(Canvas canvas) {
canvas.drawBitmap(mBitmap, 0, 0, mBitmapPaint);
canvas.drawPath(mPath, mPaint);
}
So what I am trying to do is "hide" the ImageView from the Bitmap so
that it does not get "captured". I want the ImageView to display so
the user sees it but not be drawn onto the Bitmap. How can I hide the
background drawable from the Bitmap?
I tried ImageView.setWillNotCacheDrawing(true) and
ImageView.setWillNotDraw(true) to no avail.
Any help would be greatly appreciated!
Matt.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en