3

I'm trying to implement this custom view in my application but on some devices it renders incredibly slowly. I've narrowed down the problem to when I set the background of the parent layout to a drawable (just a png image) it causes the massive slowdown. If I set the background to a color there is no slow down.

I'm guessing it has something to do with invalidating in order to redraw the snowflakes? I've tried making an ImageView with the background image instead of setting android:background in the XML but no improvement.

Any suggestions?

rycirese
  • 179
  • 1
  • 14
  • Could you give some more info about the raster asset, like size? Have you tried compressing it? Also, as it may be a performance issue, have you tried looking at memory usage and maybe ensure there are no known memory leaks in your app? – anthonymonori Jan 02 '18 at 10:55

0 Answers0