我想在以下 Android 游戏中使用哪些容器/类?
我正在编写一个带有屏幕的 Android 游戏,其中有一个 ScrollView,几乎包含屏幕上的所有内容。我需要具有移动、可以点击(但在某些情况下对点击透明)的图像元素,这些元素具有多层和动画。
我应该使用分层图像按钮吗?屏幕上可能会同时出现数十个图像按钮,而且我不知道屏幕上有 200 个图像按钮是否存在内存问题。
我需要使用画布吗?我在很多例子中看到过画布,但我不知道它们是否是最好的选择。
还有其他更好的课程或方法吗?
如果您能提供任何帮助,我们将不胜感激。
I am programming an android game that has a screen, which has a ScrollView that contains almost everything on the screen. I need to have image elements that move around, can be clicked on (but also be transparent to clicks in certain situations) that have multiple layers and animations.
Should I use layered Imagebuttons? there can potentially be doezens of them on the screen at once, and i don't know if there are memory concerns about having 200 imagebuttons on a screen.
Do I need to use a canvas? I have seen canvases in many examples, but i don't know if they are the best option.
Is there some other class or way of doing this that is better?
any help you can provide would be much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Android 游戏将为您提供最佳服务库。另请检查 e3roid。
You'd be best served by an Android game library. Check also e3roid.