IllegalArgumentException: width and height must be > 0 while loading Bitmap from View

后端 未结 5 1683
没有蜡笔的小新
没有蜡笔的小新 2020-11-27 22:17

I\'m trying to draw on an ImageViewTouch, a library which enables pinch zooming. I\'m able to draw over the image using Canvas, but when I zoom the image, the drawing disapp

5条回答
  •  醉梦人生
    2020-11-27 22:48

    If everything else is correct you are executing your code too early.

    The view's layout has not yet been measured by Android. Try executing in OnResume just to see if this is your problem.

    Cheers!

提交回复
热议问题