Comments (7)
You need to remove this function for clickable to childview
from zoomlayout.
childView's click event is changed when i scaled ViewGroup by Override dispatchDraw
from zoomlayout.
You need to remove this function for clickable to childview
https://github.com/shopgun/zoomlayout/blob/70e27a82750568f550f5f54567528cede59b0d28/library/src/main/java/com/shopgun/android/zoomlayout/ZoomLayout.java#L161
from zoomlayout.
it doesn't work for me ,in my case ,childView’s click event area is not change after scaled ,
For example, after the ViewGroup is zoomed in, the click event area of the child View is still the area before the zoom, resulting in the click being unavailable.
from zoomlayout.
@guvencan
The ViewGroup is scaled by dispatchDraw, which is equivalent to the actual position of the child View. The position of the click event after zooming in or out is incorrect. Is there any other solution? Thank you
from zoomlayout.
Because view translating in dispatchDraw function for save position on the screen but view position will be changed. For example your view position is (100, 100) in 1x scale, after scaled 2x position is (50,50) but object stay same place on the screen. You can use TapInfo class for the follow position.
from zoomlayout.
Main issue it this, every ZoomLayout's 'onTouchEvent' handled. It should handle child view 'onTouchEvent' at first.
For example,
We have 3 CustomViews with touch to draw.
When we touch on screen, it should first handle top most view's 'onTouchEvent', if it fails (like view is disabled, or not active), then 2nd from top, and so on. If no view handles 'onTouchEvent' then it must be handles by 'ZoomLayout'.
from zoomlayout.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zoomlayout.