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.
我目前正在使用简单的 invalidate/onDraw 策略开发单视图 android 应用程序,并且注意到在调用 onDraw 方法之前画布总是被擦除。有谁知道在 onDraw 方法调用之前保留当前画布内容的简单方法?非常感激任何的帮助。
使用位图来存储最后绘制的状态,并且在每个onDraw方法调用中,先将位图绘制到画布上。
onDraw