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.
我想知道,在 xml 中定义animationdrawable 和在代码中动态地制作animationdrawable 之间是否存在内存差异?
因为没有我可以接受的答案,所以这就是所说的(以及正确的)。 在 xml 中创建 AnimationDrawable 或在代码中动态创建 AnimationDrawable 没有区别。如果您在 xml 中创建,Android 的框架将在后台动态创建 AnimationDrawable。