I am using this library for make some drawing but I would be able to check if the field is empty ( so no drawing is in the layout ).
Because I'm printing the drawable on a thermal printer and if someone make no drawable is just wastes the paper.
Here is my method onClick
where I get the drawable from the layout and set it to a bitmap:
parentView.setDrawingCacheEnabled(true);
bitmap = Bitmap.createScaledBitmap(parentView.getDrawingCache(),510, 360, false);
BitmapDrawable ob = new BitmapDrawable(getResources(), bitmap);