When I have an xml layout like:

```
<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" />

```

Then there are 2 instances of the bitmap associated with drawable in memory or just one?
['https://Stackoverflow.com/questions/60028662', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2401535/']
When loading drawables from `Resources`, these will be cached with a `DrawableCache` which is a `ThemedResourceCache`.

The `ResourcesImpl` [states in a comment](https://android.googlesource.com/platform/frameworks/base/+/a09e9e4fe112a9db923cfee520ed7acfd708ecdc/core/java/android/content/res/ResourcesImpl.java#622):

> 
> 
> ```
> // First, check whether we have a cached version of this drawable
> // that was inflated against the specified theme. Skip the cache if
> // we're currently preloading or we're not using the cache.
> 
> ```
> 
>
You can find the answer here :

For instance, every time you create a Button, a new drawable is loaded from the framework resources (android.R.drawable.btn\_default). This means all buttons across all the apps use a different drawable instance as their background. However, all these drawables share a common state, called the "constant state." 

source: <https://android-developers.googleblog.com/2009/05/drawable-mutations.html?m=1>