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.
我创建了一个自定义的“视图”类,并且在该类中我覆盖了 onDraw 方法,因此我可以绘制我的游戏板。现在我需要画出我的作品,这些作品需要是 ImageView 的,所以我可以做动画等。我不确定如何将图像绘制到自定义视图上的特定位置。有任何想法吗?
所以事实证明我的概念是错误的。我无法将 ImageView 添加到扩展 View 的自定义类中。我最终要做的是将我的自定义视图添加到RelativeLayout,然后将我的每个ImageViews 添加到相同的布局中,只要首先添加自定义视图,我的imageviews 就在顶部。