In my app, I've to implement camera for photo and video in same activity like Instagram. I've implemented camera for photo and video in different activity. I would like to switch camera mode form photo to video and vice versa on swipe gesture like Instagram has, but I don't know how to switch camera from photo mode to video mode and vice versa.
Asked
Active
Viewed 525 times
2 Answers
0
Android: Switch camera when button clicked See this answer in satckoverflow
this example demonstrating switching camera when clicking button, so you can use hand gesture logic instead of this

Community
- 1
- 1

Muhammed Thasneem
- 89
- 1
- 5
0
according to instagram camera they are using viewpager wih 3 fragments(pages) and implementing every fragment with its SurfaceView (camera)
this link may helps https://www.airpair.com/android/android-camera-surface-view-fragment

Hamza Awwad
- 163
- 1
- 10