Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
试图制作一个使用 MotionEvent.ACTION_MOVE 的画布。然而,在线程启动后,水平线绘制正确,但其他线均无效或零星。一旦我发布事件,线条就会自行清除。
[编辑] 这是因为画布嵌套在 ScrollView 中。
我唯一能想到的“可能”原因是您将其放置SurfaceView在试图滚动的布局中。
SurfaceView
请发布您的布局代码以获得更好的答案。