tjek / zoomlayout Goto Github PK
View Code? Open in Web Editor NEWZoomLayout is a ViewGroup, that enables pinch-zoom and panning on child-views.
ZoomLayout is a ViewGroup, that enables pinch-zoom and panning on child-views.
<com.shopgun.android.zoomlayout.ZoomLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.shopgun.android.zoomlayout.ZoomLayout>
Able to zoom the recycler view but the scroll is not working
Kindly, can you do like this on drag the view it should be moveable in zoom layout?
Thanks in advance.
I have a zoomLayout with size width: 5000dp
, height: 3000dp
and one of view with size width: 100dp
, height: 100dp
and position x: 3000dp
, y: 1500dp
, i have tried engine.panTo
and engine.panBy
but it moves me to different places on different zoom.
for example: I have minZoom: 1f and maxZoom: 20f
if I set zoom 6.5f and pan to the view, then everything is fine; it is displayed in the center of the screen; if I set zoom 4f, the view is displayed closer to the upper left edge of the screen.
code than pan to view looks something like that:
val screenWidth = resources.displayMetrics.widthPixels
val screenHeight = resources.displayMetrics.heightPixels
val x = view.x - (screenWidth / 2 - view.width / 2)
val y = view.y - (screenHeight / 2 - view.height / 2)
engine.panTo(x = -x, y = -y, animated = true)
How can i enable click listener or other listener inside a zoom layout
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.