private static HashMap<Integer, Bitmap> mBitmapCache; mBitmapCache.put(R.drawable.bg1,object);
R.drawable.bg1
is an int
... but i want to convert into Integer
because Hashmap
takes an Integer
... and when draw the multiple objects in seconds , it creates a Integer Object runtime which affects the performence of the code...
int iInt = 10; Integer iInteger = Integer.valueOf(iInt);
P.S. Answer edited due to comments pointing out an issue with initial suggested solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With