Loop through all subviews of an Android view?

后端 未结 5 1435
北荒
北荒 2020-12-08 04:48

I’m working on a game for Android. To help implement it, my idea is to create a subclass of a view. I would then insert several instances of this class as children of the ma

5条回答
  •  青春惊慌失措
    2020-12-08 05:29

    Using Views sounds like its going to be brutally difficult to render anything well if there is movement. You probably want to be drawing to a Canvas or using OpenGL unless you're doing something really static. Here's a great talk from last years I/O conference on making Android games. Its kind of long and you can skip about 15 minutes in. Also the source is available. That should give you a good idea of ways to go about things

提交回复
热议问题