`
hemowolf
  • 浏览: 151591 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

ZXing CaptureActivity黑屏问题

阅读更多

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

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

 

Project Member #1 srowen
The 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时调用。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics