I am new to Camera API and building a simple camera app where I have built the basic camera working layout but I am missing clue to incorporate the zoom features I want the app and its codebase as simple as possible , I want to implement swipe up to zoom in and swipe down to zoom out feature
.
I have already implemented the basic camera which captures image - what should be added to achieve that desired functionality(swipe to zoom gesture) only ?Thanks in advance.
Asked
Active
Viewed 265 times
1

Achy97
- 994
- 1
- 14
- 29
-
You can use the MotionEvent class to handle this. Refer this https://stackoverflow.com/questions/18594602/how-to-implement-pinch-zoom-feature-for-camera-preview – abhishek gupta Sep 18 '18 at 09:04
-
But that answer refers to pinch zoom , I want to implement swipeup to zoom – Achy97 Sep 18 '18 at 09:07
1 Answers
0
You detect the swipeUp Event using SimpleOnGestureListener and use the zoom functionality accordingly.You can refer this How to detect swipe direction between left/right and up/down

abhishek gupta
- 1
- 1
- 1