i'm making an Android application, and i had some problem in report with "out of memory exception", after many search on the net, I found that android:background was loading background image in memory.
so i'll remove all my "android:background" declarations in my XML files, and replace it by :
background = new BitmapDrawable(getResources(),ImageFactoring.decodeSampledBitmapFromResource(getResources(), R.drawable.catalogue_button_poeles_bois, mMaxButton_Cheminees.getLayoutParams().width, mMaxButton_Cheminees.getLayoutParams().height));
mMaxButton_Cheminees.setBackgroundDrawable(background);
and before to do that, i'd want to know if "setBackgroundDrawable" is loading picture in memory or not ?