Does android reuse images loaded from resource?

前端 未结 1 1572
孤街浪徒
孤街浪徒 2021-01-18 18:02

So I have several ImageViews in a single Activity and all of them use the same image bitmap from a resource.

ImageViewOne.setImageResource(R.drawable.frequen         


        
相关标签:
1条回答
  • Quoting Dianne Hackborn from Android team:

    Also keep in mind that Resources already maintains a cache of Drawables for you, using this facility, so there is no need for you to implement your own cache for any Drawables you are retrieving from Resources.

    from this answer: Consequences of drawable.setCallback(null);

    0 讨论(0)
提交回复
热议问题