关于特殊控件的事件处理
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- android, java
- Domain
- mobile-dev
Research direction
Issue #60 mentions Android custom-view handling with Region, canvas.translate, getMatrix().invert, MotionEvent coordinates, and mMapMatrix.mapPoints(pts), but names no file or test. Locate the related note or example, verify the coordinate spaces used by these APIs, and document the intended handling; done means the note clearly answers whether event.getX()/getY() can replace the matrix mapping.
Written by the indexing model from the issue text.
Description
这个问题是特殊控件的事件处理方案那的,
Region globalRegion = new Region(-w, -h, w, h);
RectF bigCircle = new RectF(-br, -br, br, br);
Region left= new Region();
left.setPath(right_p, globalRegion);
此时 leftRegion 的left 和 top 应该是负数
canvas.translate(mViewWidth / 2, mViewHeight / 2);之后再执行 canvas.getMatrix().invert(mMapMatrix);
mMapMatrix应该就是把坐标系反向偏移回去,就是正常的坐标系,因为left不是正常坐标系的位置,那怎么能用 left.contains(x, y)???
还有就是要是使用event.getY() event.getX() 是不是就可以不用写这句代码了? mMapMatrix.mapPoints(pts);
- Dominant language
- Java
- Stars
- 9.3k
- Forks
- 2.1k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GcsSloop/AndroidNote
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
GcsSloop/AndroidNote#116 ·
-
安卓 Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
GcsSloop/AndroidNote#115 ·
-
章节缺失:安卓自定义View进阶 Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
GcsSloop/AndroidNote#114 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 55/100
GcsSloop/AndroidNote#111 · 2 reactions ·
-
博客有几篇打不开了 Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
GcsSloop/AndroidNote#110 ·
All issues in GcsSloop/AndroidNote
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
elastic/gradle-plugins#157 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cryptomator/hub#497 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
johanhaleby/occurrent#1120 ·