Add workers

This commit is contained in:
Tommaso Berlose
2020-05-06 20:58:32 +02:00
parent 2e684e0902
commit 7076311e94
11 changed files with 237 additions and 46 deletions

View File

@ -20,15 +20,12 @@ object BitmapHelper {
view.measure(measuredWidth, measuredHeight)
return try {
if (draw) {
Log.d("ciao", "bitmap ${view.measuredWidth}, ${view.measuredHeight}")
}
val btm = Bitmap.createBitmap(
view.measuredWidth,
view.measuredHeight,
if (true || draw) Bitmap.Config.ARGB_8888 else Bitmap.Config.ALPHA_8
if (draw) Bitmap.Config.ARGB_8888 else Bitmap.Config.ALPHA_8
)
if (true || draw) {
if (draw) {
//Bind a canvas to it
val canvas = Canvas(btm)
// draw the view on the canvas