mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-06-14 17:10:06 +02:00
19 lines
623 B
Java
19 lines
623 B
Java
|
package app.revanced.github;
|
||
|
|
||
|
import android.annotation.SuppressLint;
|
||
|
import android.util.Log;
|
||
|
import android.view.ViewGroup;
|
||
|
|
||
|
public final class PinchToZoomPatch {
|
||
|
@SuppressLint("StaticFieldLeak")
|
||
|
private static ViewGroup recyclerView;
|
||
|
|
||
|
public static void addPinchToZoomGesture(final ViewGroup codeViewRecycleView) {
|
||
|
if (recyclerView == codeViewRecycleView) return;
|
||
|
recyclerView = codeViewRecycleView;
|
||
|
|
||
|
recyclerView.setOnTouchListener(new PinchToZoomGesture(recyclerView.getContext()));
|
||
|
|
||
|
Log.d("revanced", "Adding pinch to zoom event handler to " + codeViewRecycleView);
|
||
|
}
|
||
|
}
|