当我有一个如下的xml布局:
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/my_image" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/my_image" />
那么在内存中与可绘制图案相关联的位图实例是2个还是仅有1个?
drawable
的着色颜色,那么从另一个屏幕加载相同的drawable
资源 -drawable
的着色将与您在程序中定义的一样,因此我猜它被缓存了。 - Pavel Poley