1

我是 Java 和 android 的新手,所以我不知道这是否可能,但我想在我的应用程序中创建一个动态可绘制的表面/视图/位置。我知道如何用可绘制的画布替换我的整个 XML 布局,但这不是我想要的。我希望这个可绘制表面位于我的静态布局之上(或之中),但我仍然没有找到如何做到这一点。下面是我的意思的说明:

示例应用

提前致谢!

4

1 回答 1

1

You have different options. You can put a custom View and override its onDraw() method to draw with its Canvas. Another option is to use SurfaceView (which provides a Thread for drawing with its Canvas, more efficient for more complex drawing). Here is more details about for the first option and second option.

于 2013-01-20T15:08:15.720 回答