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.
我有一种情况,我在 GridView 上绘制(绘制)了一条线。感谢某人的出色帮助,我在继承自 GridView 的类中重写了 dispatchPaint() 方法。在这种情况下,网格实际上是一个日历,并且正在绘制的日历比屏幕上实际显示的要多。
如果我滚动日历(GridView),画线不会随之滚动。所以我想我要么必须自己滚动线条,要么通过其他方法绘制线条,以便它与视图更紧密地关联。
有谁知道如何做到这一点?