wire up method for ending zoom
This commit is contained in:
parent
5524da3ad3
commit
0f05f9e1f4
@ -17,6 +17,7 @@ class GestureHelper {
|
||||
// Can be replaced with ratio when supported
|
||||
void onZoomIn(int steps);
|
||||
void onZoomOut(int steps);
|
||||
void onZoomEnd();
|
||||
}
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
@ -59,6 +60,11 @@ class GestureHelper {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScaleEnd(ScaleGestureDetector detector) {
|
||||
listener.onZoomEnd();
|
||||
}
|
||||
});
|
||||
|
||||
gestureView.setOnTouchListener((view, motionEvent) -> {
|
||||
|
@ -261,6 +261,11 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader
|
||||
public void onZoomOut(int steps) {
|
||||
zoomOut(steps);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onZoomEnd() {
|
||||
zoomEnd();
|
||||
}
|
||||
});
|
||||
|
||||
mTextView = new TextView(this);
|
||||
@ -360,6 +365,10 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader
|
||||
}
|
||||
}
|
||||
|
||||
private void zoomEnd() {
|
||||
renderPage(true);
|
||||
}
|
||||
|
||||
private static void enableDisableMenuItem(MenuItem item, boolean enable) {
|
||||
if (enable) {
|
||||
if (!item.isEnabled()) {
|
||||
|
Loading…
Reference in New Issue
Block a user