Skip to content

Commit

Permalink
Center image in zoom sample
Browse files Browse the repository at this point in the history
to have a verification if it's working
  • Loading branch information
hannesa2 committed Mar 5, 2021
1 parent 7cacf2d commit 1e51bb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/java/info/touchimage/demo/AnimateZoomActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class AnimateZoomActivity : AppCompatActivity(), TouchImageView.OnZoomFinishedLi
binding.imageSingle.isZoomed.not() -> binding.imageSingle.setZoomAnimated(0.9f, 0.5f, 0f, this)
}
}

// It's not needed, but help to see if it proper centers on bigger screens (or smaller images)
binding.imageSingle.setZoom(1.1f, 0f, 0f)
}

@SuppressLint("SetTextI18n")
Expand Down

0 comments on commit 1e51bb1

Please sign in to comment.