当前位置: 代码迷 >> 移动开发 >> ZXing CaptureActivity黑屏有关问题
  详细解决方案

ZXing CaptureActivity黑屏有关问题

热度:7880   发布时间:2013-02-26 00:00:00.0
ZXing CaptureActivity黑屏问题

? ?ZXing的CaptureActivity在其他activity切换回来时会出现黑屏现象,跟踪发现surfaceDestroyed并不一定能调用到。

? ?在ZXing项目找到zxing不支持tabhost的答复。

?

Project Member #1 srowenThe app doesn't use a TabHost. If you are writing your own app, indeed, you may need to write different code! this part is not a library that is supposed to work in other contexts.

?

? ?虽然项目采用tabactivity搭建框架,但CaptureActivity是单独的activity。

? ?针对surfaceDestroyed在activity切换时不会总是调用的问题,https://github.com/commonsguy/cw-advandroid/tree/master/Camera/Preview/?的解决方法值的参考。

也即是把打开摄像头的动作延迟到surfaceChanged时调用。