perthcpe23 / android-mjpeg-view

Custom View to display MJPEG
MIT License
63 stars 21 forks source link

Is there a way to zoom the view with pinch gesture? #2

Closed roger-zacharczyk closed 3 years ago

perthcpe23 commented 5 years ago

Sorry, not natively for now. I'm working on a new branch pinch-zoom for this feature and will include this in the next release. In the meantime, you can zoom an entire view using View.setScaleX and View.setScaleY. For pinch zoom, ScaleGestureDetector can help you detect pinch gestures.

yeahman45 commented 4 years ago

any news about pinch zoom?

yeahman45 commented 4 years ago

I got the pinch-and-zoom branch.. it is not perfect but it works :) thx I also added basic authentication for my needs.

DuduPiglet commented 3 years ago

I got the pinch-and-zoom branch.. it is not perfect but it works :) thx

How can I change the branch in Android Studio? I tried using JitPack but it did not work.

The way I implemented it: (In the project Gradle)

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

(In the module Gradle)

dependencies {
    ...
    implementation 'com.github.perthcpe23:mjpegviewer:pinch-zoom-SNAPSHOT'
}
perthcpe23 commented 3 years ago

Hi guys, I just release a new version which support pinch-zoom. Please use latest version (v1.0.9) and use setSupportPinchZoomAndPan(true) to enable/disable pinch-zoom and pan.