0

I use Chris Bane's PhotoView to display ImageViews. After zooming in, I can't zoom out to the originial size of the image. It seems like the borders are too small, but is there any other explanation?

xml photoview setup:

    <com.github.chrisbanes.photoview.PhotoView
        android:id = "@+id/ScreenshotPhotoView"
        android:src = "@drawable/LogoImg"
        android:layout_marginTop = "40dp"
        android:layout_marginBottom = "40dp"
        android:layout_width="320dp"
        android:layout_height="180dp"
        android:layout_gravity = "center_horizontal"
        android:scaleType = "fitCenter"
    />
Daniel Reyhanian
  • 579
  • 4
  • 26

1 Answers1

0

Seems like the problem was the fact that I set the layout_width and layout_height attributes to specific values (320x180). Solved by changing to warp_content or match_parent.

Daniel Reyhanian
  • 579
  • 4
  • 26