code: @NonNull
      static Bitmap getBitmapFromView(@NonNull final View v) {
          Bitmap bitmap = Bitmap.createBitmap(v.getMeasuredWidth(), v.getMeasuredHeight(), Bitmap.Config.ARGB_8888);
          Canvas canvas = new Canvas(bitmap);
          v.draw(canvas);
          return bitmap;
      }
docs: Returns a bitmap showing a screenshot of the view passed in.