【问题标题】:Adding Swipe gesture zoom to my Android Camera App将滑动手势缩放添加到我的 Android 相机应用程序
【发布时间】:2018-09-18 08:57:06
【问题描述】:

我是 Camera API 的新手,我正在构建一个简单的相机应用程序,我已经在其中构建了基本的相机工作布局,但我缺少合并缩放功能的线索,我希望应用程序及其代码库尽可能简单,I want to implement swipe up to zoom in and swipe down to zoom out feature。 我已经实现了捕获图像的基本相机 - 应该添加什么来实现所需的功能(滑动到缩放手势)?提前致谢。

【问题讨论】:

标签: android api android-camera gesture android-camera2


【解决方案1】:

您使用 SimpleOnGestureListener 检测到 swipeUp 事件并相应地使用缩放功能。您可以参考此How to detect swipe direction between left/right and up/down

【讨论】:

    猜你喜欢
    • 2017-02-06
    • 1970-01-01
    • 2018-04-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-22
    • 1970-01-01
    相关资源
    最近更新 更多