【问题标题】:move overlay image on camera preview在相机预览上移动叠加图像
【发布时间】:2014-10-11 08:22:03
【问题描述】:

我想使用表面视图在实时相机预览中叠加图像。在这种情况下有很多教程,我的程序运行完美。现在我想添加通过触摸事件在实时相机预览中移动叠加图像的功能。我找不到任何解释这一点的代码或教程。有人可以帮帮我吗?

【问题讨论】:

    标签: android android-camera surfaceview surfaceholder camera-overlay


    【解决方案1】:

    如果您不使用 OpenGL 并且只是将覆盖层与不透明度浮动到 surfaceView 上,则可以设置自己的 onDragListener() 来处理可以移动覆盖层检测用户手指的 android DragEvent(http://developer.android.com/reference/android/view/DragEvent.html)

    【讨论】:

      猜你喜欢
      • 2012-10-06
      • 1970-01-01
      • 2011-11-08
      • 2016-11-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多