ZoomLayout | 2D zoom and pan behavior for View hierarchies, images, video streams, and much more, written in Kotl | Android library
kandi X-RAY | ZoomLayout Summary
kandi X-RAY | ZoomLayout Summary
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. 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
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ZoomLayout
ZoomLayout Key Features
ZoomLayout Examples and Code Snippets
Community Discussions
Trending Discussions on ZoomLayout
QUESTION
In my project After add Exoplayer 2.10.5 in my app.gradle file I get this error:
my gradle version is 3.5.2
...ANSWER
Answered 2020-May-13 at 11:45Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:25:5-171:19 to override.
My Suggestion is - Move to AndroidX
. You can migrate an existing project to AndroidX by selecting Refactor > Migrate to AndroidX from the menu bar.
Upgrade to
QUESTION
I'm using a custom lib that implements a zoomable, pinchable and scrollable layout, but I when I zoom the layout in, I cant get the coordinates of the visible part. Is there a way of doing that? Android documentation explains nothing about viewport.
This pictures has an example. The rectangle in the left is my layout. When I zoom it, the user will only see the smaller one, but it will fill all the screen. How can I get the coordinates of the small rectangle (in red)?
...ANSWER
Answered 2020-May-12 at 13:34So I'm not the library's true user that I don't know actual answer. But I myself do similar thing as the library in my custom ImageView. So I can suggest somewhat. Please try and examine later by yourself.
The library has those Pan APIs. I think by using either getPan()
/getPanX()
/getPanY()
or getScaledPan()
/getScaledPanX()
/getScaledPanY()
you can get the left-top point's coordinates. (Maybe, the latter scaled ones are what you want?)
Once you get the left-top point's coordinates, you can calculate the others by the rectangle's width and height.
To know width and height, you can reverse-calculate from your ImageView's width and height, and current scale factor.
To know the width and height of your ImageView, use getWidth()
and getHeight()
.
To know the current scale factor of the library, either getZoom()
or getRealZoom()
of Zoom APIs should be usable.
Then, divide ImageView's width or height by the current scale factor and you get the rectangle's width or height.
At last, based on the left-top point's coordinates, left-bottom point is plus height, right-top point is plus width and right-bottom point is plus width and height.
Sample Code
layout/activity_main.xml:
QUESTION
I recently came across the following class declaration:
...ANSWER
Answered 2020-May-01 at 07:11This is called delegation, specifically it is a type of delegation known as implementation by delegation.
By doing this, the class C
implements the interface using the other object.
i.e. when you call the method (function) defined in the interface then the call is going to get transferred to the object you delegated in your case it is the field
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ZoomLayout
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page