Android Zxing change orientation to portrait

前端 未结 9 974
青春惊慌失措
青春惊慌失措 2020-12-12 19:29

I\'m trying to rotate Zxing display after reading a few questions and posts about the issue. After following the instructions, the display did rotate, but the rectangle of t

9条回答
  •  温柔的废话
    2020-12-12 19:52

    Thank you for your answer!! it really helped me, one thing that I noticed is that at least on zxing 2.1 you need to pass "rotatedData" to buildLuminanceSource instead of just "data", the line end up like this:

    PlanarYUVLuminanceSource source = activity.getCameraManager().buildLuminanceSource(rotatedData, width, height);
    

    Hopefully this helps someone else!

提交回复
热议问题