ShapeOfView
ShapeOfView copied to clipboard
Big Drawing Bug
Unfortunately when you try to create a Bitmap from the View it wont show the correct View.
How it looks when added as a view:
How it looks when taking a bitmap from this view:
The method you use to create the bitmap is totally arbitrary:
DisplayMetrics dm = getResources().getDisplayMetrics(); v.measure(View.MeasureSpec.makeMeasureSpec(dm.widthPixels, View.MeasureSpec.EXACTLY), View.MeasureSpec.makeMeasureSpec(dm.heightPixels, View.MeasureSpec.EXACTLY)); v.layout(0, 0, v.getMeasuredWidth(), v.getMeasuredHeight()); Bitmap returnedBitmap = Bitmap.createBitmap(v.getMeasuredWidth(), v.getMeasuredHeight(), Bitmap.Config.ARGB_8888); Canvas c = new Canvas(returnedBitmap); v.draw(c);
or something like:
setDrawingCacheEnabled(true); buildDrawingCache(); getDrawingCache();
It really doesn't depend on the way you use to create the screenshot.
@Uni2K Did you find a solution for this?
@Uni2K Did you find a solution for this?
No, unresolvable. I ended up creating my own stuff. Its not that hard. There are plenty of "path mask views/layouts" out there. Things like: https://android-arsenal.com/details/1/683