ZoomLayout
2D zoom and pan behavior for View hierarchies, images, video streams, and much more, written in Kotlin for Android.
Install / Use
/learn @natario1/ZoomLayoutREADME
⠀ <!-- Hack to add whitespace -->
<p align="center"> <img src="docs/static/banner.png" width="100%"> </p>Need support, consulting, or have any other business-related question? Feel free to <a href="mailto:mat.iavarone@gmail.com">get in touch</a>.
Like the project, make profit from it, or simply want to thank back? Please consider sponsoring!
ZoomLayout
A collection of flexible Android components that support zooming and panning of View hierarchies, images, video streams, and much more - either programmatically or through touch events.
implementation("com.otaliastudios:zoomlayout:1.9.0")
ZoomLayout: a container that supports 2D pan and zoom to a View hierarchy, even supporting clicks [docs]ZoomImageView: (yet another) ImageView that supports 2D pan and zoom [docs]ZoomSurfaceView: A SurfaceView that supports 2D pan and zoom with OpenGL rendering [docs]- Powerful zoom APIs [docs]
- Powerful pan APIs [docs]
- Lightweight, no dependencies
- Works down to API 16
In fact, ZoomLayout, ZoomImageView and ZoomSurfaceView are just very simple implementations of the
internal ZoomEngine [docs]. The zoom engine lets you animate everything through
constant updates, as long as you feed it with touch events, with a Matrix-based mechanism
that makes it very flexible.
⠀ <!-- Hack to add whitespace -->
<p align="center"> <img src="docs/static/gif-1.gif" width="250" hspace="15"><img src="docs/static/gif-2.gif" width="250" hspace="15"><img src="docs/static/gif-3.gif" width="250" hspace="15"> </p>⠀ <!-- Hack to add whitespace -->
Support
If you like the project, make profit from it, or simply want to thank back, please consider supporting it through the GitHub Sponsors program! You can have your company logo here, get private support hours or simply help me push this forward.
Feel free to <a href="mailto:mat.iavarone@gmail.com">contact me</a> for support, consulting or any other business-related question.
Setup
Please read the official website for setup instructions and documentation. You might also be interested in our changelog.
<com.otaliastudios.zoom.ZoomLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical|horizontal"
app:transformation="centerInside"
app:transformationGravity="auto"
app:alignment="center"
app:overScrollHorizontal="true"
app:overScrollVertical="true"
app:overPinchable="true"
app:horizontalPanEnabled="true"
app:verticalPanEnabled="true"
app:zoomEnabled="true"
app:flingEnabled="true"
app:scrollEnabled="true"
app:oneFingerScrollEnabled="true"
app:twoFingersScrollEnabled="true"
app:threeFingersScrollEnabled="true"
app:minZoom="0.7"
app:minZoomType="zoom"
app:maxZoom="2.5"
app:maxZoomType="zoom"
app:animationDuration="280"
app:hasClickableChildren="false">
<!-- Content here. -->
</com.otaliastudios.zoom.ZoomLayout>
Related Skills
docs-writer
99.0k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
335.4kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
pr
for a github pr, please respond in the following format - ## What type of PR is this? - [ ] 🍕 Feature - [ ] 🐛 Bug Fix - [ ] 📝 Documentation - [ ] 🧑💻 Code Refactor - [ ] 🔧 Other ## Description <!-- What changed and why? Optional: include screenshots or other supporting artifacts. --> ## Related Issues <!-- Link issues like: Fixes #123 --> ## Updated requirements or dependencies? - [ ] Requirements or dependencies added/updated/removed - [ ] No requirements changed ## Testing - [ ] Tests added/updated - [ ] No tests needed **How to test or why no tests:** <!-- Describe test steps or explain why tests aren't needed --> ## Checklist - [ ] Self-reviewed the code - [ ] Tests pass locally - [ ] No console errors/warnings ## [optional] What gif best describes this PR?
arscontexta
2.9kClaude Code plugin that generates individualized knowledge systems from conversation. You describe how you think and work, have a conversation and get a complete second brain as markdown files you own.
