Performance wise, what is typically better, using an image or a xml created shape as a drawable?

前端 未结 2 1342
自闭症患者
自闭症患者 2020-12-16 17:15

For example, if each row in a list had a background that was a gradient, would it be better to use a image of a gradient or to define that gradient in a shape drawable in xm

2条回答
  •  轮回少年
    2020-12-16 18:00

    Don't prematurely optomize. That's a really hard thing to know what will be better. I would just do it in xml since it would be easier to change.

提交回复
热议问题