• Stars
    star
    1,051
  • Rank 43,859 (Top 0.9 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created about 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

2D zoom and pan behavior for View hierarchies, images, video streams, and much more, written in Kotlin for Android.

Build Status Release Issues

â €

Need support, consulting, or have any other business-related question? Feel free to get in touch.

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.

â €

â €

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 contact me 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>

More Repositories

1

CameraView

📸 A well documented, high-level Android interface that makes capturing pictures and videos easy, addressing all of the common issues and needs. Real-time filters, gestures, watermarks, frame processing, RAW, output of any size.
Java
4,943
star
2

Autocomplete

Simple yet powerful autocomplete behavior for EditTexts, to avoid working with MultiAutoCompleteTextView APIs.
Java
357
star
3

BottomSheetCoordinatorLayout

A handy CoordinatorLayout that works well when used in a bottom sheet, even with AppBarLayouts inside.
Java
268
star
4

ViewPrinter

Live preview, edit and print functionality for View hierarchies. Supports PDF, PNG, JPEG.
Java
190
star
5

Egloo

A lightweight Kotlin multiplatform framework for OpenGL ES and EGL management based on object-oriented components, inspired by Google's Grafika.
Kotlin
146
star
6

GIFCompressor

An Android tool to compresses your GIFs into lightweight MP4 video using fast, hardware-accelerated encoders. Supports cropping, rotation, GIF concatenation and much more.
Java
123
star
7

Elements

âš’ Modular components for RecyclerView development enforcing clean, reusable and testable code, with built-in support for paging and complex hierarchies of data.
Kotlin
82
star
8

whatsapp-database-merger

Small command-line utility to safely merge multiple WhatsApp backups (msgstore.db) into one.
Kotlin
65
star
9

NestedScrollCoordinatorLayout

A CoordinatorLayout that implements nested scrolling and propagates scroll events to parent views.
Java
63
star
10

Firestore

The lightweight, efficient Android wrapper for Google's Firestore model data.
Kotlin
33
star
11

ConstrainedScrollBehavior

An AppBarLayout.ScrollingViewBehavior that adapts scrolling view height based on its content.
Java
18
star
12

Elements-Deprecated

A library of reusable components for RecyclerView, simplifying the development of complex adapters.
Java
11
star
13

Playground

Kotlin
1
star